- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.4k
Closed
Labels
coreRelated to codegen core/cliRelated to codegen core/clipluginswaiting-for-releaseFixed/resolved, and waiting for the next stable releaseFixed/resolved, and waiting for the next stable release
Description
Describe the bug
I have a query like this which reads introspection in runtime to figure user permissions. Unfortunately, the generated types do not include the GUserPermissions type at all. But if I add something else to that query, it appears there, but without the introspection part.
export const UserPermissionsQuery = gql`
  query GUserPermissions {
    __schema {
      queryType { fields { name } }
      mutationType { fields { name } }
    }
  }
`To Reproduce
I am using API approach and call it like this. Full introspection is generated in JSON file. I've checked and it includes types for __schema, so that should be a problem.
  generate({
    schema: jsonPath,
    out: './src/graph/types.ts',
    template: 'graphql-codegen-typescript-template',
    args: ['./src/**/*graphql.ts'],
    skipSchema: true,
    overwrite: true,
  })Expected behavior
To have TypeScript types based on introspection query.
Environment:
- OS: Windows 10 x64
- Codegen: 0.9.2
- Node: 10.11.0
patricknazar, brabeji and iskotar
Metadata
Metadata
Assignees
Labels
coreRelated to codegen core/cliRelated to codegen core/clipluginswaiting-for-releaseFixed/resolved, and waiting for the next stable releaseFixed/resolved, and waiting for the next stable release