Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIndows issue GraphQLError: Unknown operation named "null". #1

Open
wroughtec opened this issue Oct 26, 2017 · 1 comment
Open

WIndows issue GraphQLError: Unknown operation named "null". #1

wroughtec opened this issue Oct 26, 2017 · 1 comment

Comments

@wroughtec
Copy link

wroughtec commented Oct 26, 2017

Ran into a issue while going through the course on FE masters and initially thought it was me. On Windows when running any of the nested query eg.

{ 
  allPlaylists {
    title
    songs {
      title
    }
  }
}

I would get the following error reported server side when I ran the query first time:

GraphQLError: Unknown operation named "null".
    at buildExecutionContext (pathTo\node_modules\graphql\execution\execute.js:202:13)
    at executeImpl (pathTo\node_modules\graphql\execution\execute.js:121:15)
    at Object.execute (pathTo\node_modules\graphql\execution\execute.js:110:229)
    at doRunQuery (pathTo\node_modules\apollo-server-core\src\runQuery.ts:149:16)
    at pathTo\node_modules\apollo-server-core\src\runQuery.ts:70:39
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

On the browser I would get when I run the query before anything else:
image

However if I run a query ie { allPlaylists {title}} first then the nested query it works:
image

Notice that to only difference (apart from the error code) is operationName: "null" compared to operationName: null and as long as you don't refresh graphiql all future queries seem to work its just when you try a nest query before a normal query

To check I was not going mad I quickly checked things on my Mac and had no issues so seems to be a Windows thing so this is a heads up if anyone else runs into the issue (the issue is present on lesson-14-solution branch)

Good course by the way learn t a lot

davidinoa added a commit to davidinoa/api-design-node-v2 that referenced this issue May 13, 2018
@Hendrixer
Copy link
Collaborator

I just got a windows machine 😄 so I'll try to reproduce this, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants