Build GraphQL Microservices With Nest.js & Apollo Federation 2
Vložit
- čas přidán 26. 07. 2024
- This video shows how we can quickly build GraphQL microservices using the Nestjs GraphQL module and Apollo Federation 2 to stitch together multiple schemas.
Github Repo: github.com/mguay22/nestjs-gra...
Get my highly-rated Udemy courses at a discount here: michaelguay.dev/udemy/
Timestamps:
00:00:00 Introduction
00:00:55 Create Monorepo
00:02:52 Users Service
00:09:32 Posts Service
00:14:25 Connect Gateway
00:24:54 Auth & Context
Check out my productivity app called Thrive:
iOS: apps.apple.com/us/app/thrive-...
Android: play.google.com/store/apps/de...
Web: www.thriveapp.one/ - Věda a technologie
Thank you Michael. I had a big project and I had to do with microservices and your tutorial helped me a lot!
God bless you man!
Great video, well explained
Thanks for sharing
Thanks, Great video keep it up
Great explanation, thank you
Очень хороший туториал по GraphQL , спасибо большое)
thank you. good one.
Man, it's amazing
Thank you so much ✌✌👍👍👌👌🙌🙌🙏🙏😍😍
Hey Michael, thanks for this video 🙂 Apollo Federation 2 is what I'm working on too. We can achieve sync communication between subgraphs. But, what about async communication? subscriptions are not supported AFAIK. The only thing I found on apollo docs is federation-subscription-tools. However, it's far from being a reliable solution & over complicating the scenario.
Any idea for async communication? would be wonderful if we can do it in Nestjs environment.
Cheers
Excellent! thank you very much for this!
thank you for this great video, I have a question how to exclude some routes that have @isPublic decorator in the auth context?
i started learning about microservices through your videos, now i am able to setup nestjs microservices with kubernetes and docker, can you make a video on best practices of building microservices with kubernetes ?
My new Ultimate Nest.js Microservices course will cover this! Stay tuned for its release in May.
Get my highly-rated Udemy courses at a discount here: michaelguay.dev/udemy/
Hello Michael, or anyone who can help. My question is, can I replace the url with any public graphql api url that is accessible through graphql playground? Does the name of the service in the subgraphs array matter? Cause I keep getting this error message when I use a public graphql api url: Error: Couldn't load service definitions for "institutions" at (api url), what I'm doing wrong?
What should I do if I want to use MYSQL ???
Thanks. Would like to see how nestjs plays with tRPC
Good video idea. Thanks!
Hi, how to prevent graphql gateway fail if one of our subgraphs is down? how you handle this? This behavior(actually bug) is completely against the microservices architecture concept and seems apollo doesnt care about it!!
how to inject a laravel service into this gateway ?
Is possible to have many-to-many relations in this video you were talking about one user having many posts, so one post belongs to one user, just imagine how it would be possible to have one post belong to many users, how GraphQL can handle it?
can you solved the federation with subscription problem in code first?
Hello, any updates regarding your Udemy course? thanks!
Stay tuned for its release in May!
@@mguay thank you,instant buy for sure!
@Module({
imports: [
GraphQLModule.forRoot({
driver: ApolloGatewayDriver,
server: {
cors: true,
"cors:true is redline"
"Type '{ cors: true; }' is not assignable to type 'Omit'.
Object literal may only specify known properties, and 'cors' does not exist in type 'Omit'."
what could be the cause of the error
NestJs updated apollo to server v4 so you have to use the express server cors option.
How did you resolve this issue?
Hi Sir, I've encountered an error throw Error( ^ Error: A valid schema couldn't be composed. The following composition errors were found: Non-shareable field "User.id" is resolved from multiple subgraphs: it is resolved from subgraphs "posts" and "users" and defined as non-shareable in subgraph "users" at IntrospectAndCompose.createSupergraphFromSubgraphList