graphql-codegen-vscode icon indicating copy to clipboard operation
graphql-codegen-vscode copied to clipboard

Server usage

Open asfernandes opened this issue 2 years ago • 2 comments

I'm trying to use this extension in a apollo server project.

There exists multiple .graphql files defining the schema and the generator updates a json (introspection) and a generated.ts file (typescript, typescript-resolvers).

The usage in VSCode with this extension is problematic.

It only works (even for the types) if in the file I'm saving there is a query, but I do not want to create queries, I just wan't to create the schema in these .graphql files.

asfernandes avatar Feb 14 '23 17:02 asfernandes

Without a query an error is generated: Codegen threw 2 errors, first one: Unable to find any GraphQL type definitions for the following pointers:

asfernandes avatar Feb 14 '23 17:02 asfernandes

this only works on FE projects. PRs to enable BE usage would be welcome

capaj avatar Apr 24 '23 10:04 capaj