drizzle-graphql - buildSchema doesn't support `ApolloFederationDriver`

Context I'm building a NestJS microservice application with GraphQL using ApolloFederationDriver. Its main components is: 1) A GQL federation gateway: as super-graph (left-handed side in the code snippet image) and this will connect to distributed schema in other subgraph microservices 2) Subgraph microservices: this will hold actuall schema of GQL in each microservice (mid and right-handed side) the GQL schema will be generated from drizzle buildSchema function. Currently, it seems to be not working with ApolloFederationDriver. Since when I try to access to the gateway playground, I can't see those scheme that generated from drizzle at all, just only my manual resolver appear there. Please tell me if the buildSchema function can work with ApolloFederationDriver already. Thank you 🙏
No description
No description
21 Replies
Tungdayhehe
TungdayheheOP6mo ago
@S. Reka can u confirm if my config is correct?
Sword Molester
Sword Molester6mo ago
I've never used that tech stack or driver before, got to do further investigation. Could you provide an example of this issue in code format? That would make error reproduction much easier
Tungdayhehe
TungdayheheOP6mo ago
Thanks for your response, may I give you the Github repository? To startup, you can just initialize the project by follwing README instruction https://github.com/tung-dnt/microshop
GitHub
GitHub - tung-dnt/microshop
Contribute to tung-dnt/microshop development by creating an account on GitHub.
Sword Molester
Sword Molester6mo ago
That should work, investigating May take a while, having trouble getting your repo to work
Tungdayhehe
TungdayheheOP6mo ago
Thanks for your effor
Sword Molester
Sword Molester6mo ago
Do you have any idea what might cause this in pnpm init:dev script?
No description
Sword Molester
Sword Molester6mo ago
And this happens in the docker image that it creates, not sure what's going on here
No description
Sword Molester
Sword Molester6mo ago
but either way I can't get to the menus that are in your screenshots
Tungdayhehe
TungdayheheOP6mo ago
letme update start up shell script maybe your machine doesn't support the syntax
Sword Molester
Sword Molester6mo ago
That might be the case since I'm using WSL
Tungdayhehe
TungdayheheOP6mo ago
@S. Reka can you pull the latest commit and try again? because gateway container will connection to product container to retrieve its graphql schema, if product container isn't up at port 3000, then gateway container can't connect to product
Sword Molester
Sword Molester6mo ago
Nope, same thing
No description
Sword Molester
Sword Molester6mo ago
I'll try to set up my own repo using the stack you use if I'll fail to start this one, will message you once I've found anything. For now, can you log what the buildSchema returns in entities? If everything is alright there, I'm going to have to resolve the issue with this particular library it seems.
Tungdayhehe
TungdayheheOP6mo ago
Okay, i’ll log both schema and entities here's entities
Tungdayhehe
TungdayheheOP6mo ago
here's schema
Tungdayhehe
TungdayheheOP6mo ago
I think this is just the problem with schema compatibility
Sword Molester
Sword Molester6mo ago
Yeah, since entities and schema are in an expected shape, I'd say there's something to this library I don't know about, thanks for the logs, I'll try to fix it ASAP if that's possible.
Tungdayhehe
TungdayheheOP6mo ago
Thank you, that's a huge effort how can i buy you a coffee?
Sword Molester
Sword Molester6mo ago
Oh, don't worry about that, and I prefer tea anyways! If you want to do it anyways though, just go to drizzle team sponsorships Well, I've managed to finally get that script running, but now I'm getting something else: As far as I understand the second error might be the reason your schema gets lost in process, since graphql server tries to fetch it from a non-existing source
Want results from more Discord servers?
Add your server