Graphiql: Refresh browser can't execute request without make a change

Created on 12 Dec 2016  路  6Comments  路  Source: graphql/graphiql

When I go to http://localhost:3001/graphql?query=%7B%0A%20%20people(id%3A%2011)%7B%0A%20%20%20%20id%0A%20%20%20%20firstName%0A%20%20%20%20lastName%0A%20%20%20%20email%0A%20%20%7D%0A%7D&operationName=null I can't directly run my request when DOM is ready.

Showing this

{
  "errors": [
    {
      "message": "Unknown operation named \"null\"."
    }
  ]
}

I must change little bit, like add some space and it works again like normally.

question

All 6 comments

Hi @rohmanhm - I see your url includes operationName=null; is there a specific reason why you're setting it as that? Could you remove that parameter and try the updated URL again?

yeah, I removed and work perfectly like i want.
but why it generates operationName=null?

I'm not sure how you got that URL - I tested with the SWAPI example and wasn't able to reproduce the issue. How did you get the URL? It's possible there's a bug with how we save the query on the address bar.

Closing this issue since it's resolved - feel free to continue this conversation here, or we could open another issue that tackles other problems :D

I have exactly the same issue here! Everything as both of you related.

This is happing while I follow How To GraphQL -The Fullstack Tutorial for GraphQL

"dependencies": {
"body-parser": "^1.17.2",
"dataloader": "^1.3.0",
"express": "^4.15.3",
"graphql": "^0.10.3",
"graphql-server-express": "^1.0.0",
"graphql-tools": "^1.1.0",
"mongodb": "^2.2.30"
},

@yuricamara This issue is resolved with the recent publish for express-graphql and graphiql, and I'm assuming either graphql-server-express or graphql-tools is using the older version of express-graphql or graphiql. @helfer might be able to assist you furthermore.

Ok. Thank you!

Was this page helpful?
0 / 5 - 0 ratings