Skip to content

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

@wroughtec

Description

@wroughtec

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions