matthewmueller / matthewmueller/graph.ql

Send post request using postman

Open
#17 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
629
Forks
27
PR merge metrics
No merged PRs in 30d

Description

How do I send post request using postman in graphql.?

app.post('/mutation',(req,res)=>{
_mutationSchema(
mutation create($post:PostInput){ post:create_post(post:$post){ title } }
).then((result)=>{
res.send(result);
})
});

I am getting this error on postman

{
"data": {
"post": null
},
"errors": [
{
"message": "Cannot read property 'title' of undefined",
"originalError": {}
}
]
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the app.post('/mutation') entry point and the _mutationSchema create_post mutation shown in the issue; reproduce the request in Postman and inspect the failing mutation path. Done means the request returns the post title without the "Cannot read property 'title' of undefined" error.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, javascript, postman
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.