1

I have a graphql/mutations/session.mutation.gql file:

mutation CreateSession {
  createSession
}
// codegen.yml
overwrite: true
schema: "http://localhost:4000/graphql"
documents: "**/*.{gql,graphql}"
generates:
  src/generated/queries.tsx:
    plugins:
      - "typescript"
      - "typescript-operations"
      - "typescript-react-apollo"

When I run graphql-codegen --config codegen.yml I get the error:

Cannot read property 'name' of undefined

If I comment out the mutation the codegen compiler works without error.

Peter Boomsma
  • 8,851
  • 16
  • 93
  • 185

0 Answers0