gqlgenc icon indicating copy to clipboard operation
gqlgenc copied to clipboard

Federated Schema

Open NickPadilla opened this issue 2 years ago • 3 comments

Hello, I am working on prototyping an Apollo GraphQL Federated environment. I was hoping to use this project to generate the client stubs for this environment. I am currently getting this error, on a set of Federated GraphQL schema definitions.

failed to load schema: load local schema failed: gql/valid.graphql:22: Undefined directive key.generate.go:9: running "gqlgenc": exit status 4

GQLGEN worked to generate the server stubs but I cannot get GQLGENC to do the same. Is there some way to ensure client stubs can be generated for Federated Types?

NickPadilla avatar May 05 '22 02:05 NickPadilla

@NickPadilla sorry, I am new to this event. I would like more detailed information. The error seems to be using something that is not defined in the schema.However, it may be Federated environment.

Yamashou avatar May 16 '22 10:05 Yamashou

I'm getting a similar error, which started happening in version v0.10.0, version v0.0.9 does work.

failed to load schema: load remote schema failed: validation error: https://app.plural.sh/gql:0: Undefined directive deprecated.exit status 4

Since this is referencing a deprecated directive, I think it might be related to https://github.com/Yamashou/gqlgenc/pull/150.

davidspek avatar Sep 28 '22 15:09 davidspek

I commented out the code from https://github.com/Yamashou/gqlgenc/pull/150 and that has solved the error.

davidspek avatar Sep 28 '22 16:09 davidspek