question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

graphqlRequest: cannot run graphql mutation

See original GitHub issue
Uncaught (in promise) Error: Must contain a query definition.       getFromAst.js:...

I merged code from feature/react-intl branch and got the above error.

@langpavel : the new way of integrating Apollo-Client broke the whole my projects graph apis. There is currently no graphqlRequest for mutation request. IMO, graphqlRequest should support both query and mutation request.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
langpavelcommented, May 30, 2017

Ok @manhhailua, It is technically possible to distinguish query against mutation inside createGraphqlRequest so it can be migrated to Apollo completely. I’m marking this as a bug for now, will look at this soon

0reactions
langpavelcommented, May 30, 2017

@jayhuang75 it should be fixed by 08be6ffa095542ae10890e4ce6871ff995390b7e

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mutations returning Bad Request · Issue #360 - GitHub
I can't find what I'm doing wrong with mutations, simple queries are working well but I have no luck with mutations.
Read more >
Making GraphQL Requests using HTTP Methods
To make a GraphQL request using the POST HTTP method, ... You can only execute query operations ( mutation operations don't work).
Read more >
Mutation returns 400 error but works in GraphiQL
I've been following tutorials and trying to learn graphql with react and express and I'm running into trouble. My mutation works when I...
Read more >
graphql-request - npm
Minimal GraphQL client supporting Node and browsers for scripts or simple apps. Latest version: 5.1.0, last published: 9 days ago.
Read more >
Resolve unauth errors for GraphQL requests in AWS AppSync
If the header doesn't have the correct credentials, then the authorization mode rejects the request. For JSON Web Tokens (JWT), the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found