Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Apollo Federation support #483

Open
JakesBas opened this issue Jul 18, 2019 · 4 comments
Open

Apollo Federation support #483

JakesBas opened this issue Jul 18, 2019 · 4 comments

Comments

@JakesBas
Copy link

Description

With the new release of Apollo Federation (https://blog.apollographql.com/apollo-federation-f260cf525d21), new keywords and directives can be used in the graphql schema declaration.

More information on all that Apollo Federation allows can be read in their official documentation (https://www.apollographql.com/docs/apollo-server/federation/introduction/)

Out team has managed to figure out a workaround for generating resolvers with the @key directive added to the schema, but at the moment, graphqlgen cannot generate resolvers for types that use the extend keyword.

A typical error that is generated when trying to run graphqlgen with a type that uses the extend keyword would look like the following.

"Error occurred while reading schema: Error: Field company: Couldn't find type in any of the schemas."

This feature request aims to include Apollo Federation support with regards to generating resolvers.

Additional context

@AlexQuidditch
Copy link

@JakesBas have you found any solution?

@JakesBas
Copy link
Author

Hey @AlexQuidditch,
Our team managed to find a working solution. However, it is not that elloquent. Let me know what problem you are facing and if you would like a rundown of our workaround. Haven't revisited this issue again and the solution dates 8 months or so back, so its not that fresh in my mind, but I don't mind doing some digging upon request

@Urigo
Copy link

Urigo commented Mar 31, 2020

@JakesBas @AlexQuidditch graphql-code-generator, which grahqhgen was deprecated in favor of, has complete Federation support.

Would you mind trying it out and let me know if you experience any issues?

@JakesBas
Copy link
Author

JakesBas commented Apr 1, 2020

@Urigo Thanks for the info. Will investigate tomorrow and let you know what the results are!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants