enisdenjo / graphql-yoga-nestjs

Nest GraphQL GraphQL Yoga driver
https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-nestjs
25 stars 11 forks source link

Schema first approach with federation #77

Closed timkuilman closed 1 year ago

timkuilman commented 1 year ago

The examples have a directory graphql-federation-code-first. I tried hooking up a schema first NestJS application using the Yoga driver but that doesn't seem to work. Does anyone have some lead on how to change a regular schema into a federated schema?

Error: Couldn't load service definitions for "<servicename>" at http://localhost:4003/graphql: Cannot query field "_service" on type "Query".

Looking forward to try out the yoga federation implementation!

ardatan commented 1 year ago

Could you create a reproduction? Thanks! Also make sure you use buildSubgraphSchema from @apollo/subgraph package in order to create a subgraph schema.

timkuilman commented 1 year ago

Thanks, that helped! It was something on my end.