Build GraphQL Microservices With Nest.js & Apollo Federation 2

Sdílet
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

Komentáře • 30

  • @husinsajjadi5331
    @husinsajjadi5331 Před rokem +1

    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!

  • @gumayuzi939
    @gumayuzi939 Před rokem

    Great video, well explained
    Thanks for sharing

  • @qishqish3123
    @qishqish3123 Před rokem +2

    Thanks, Great video keep it up

  • @ricardoalmira6005
    @ricardoalmira6005 Před rokem

    Great explanation, thank you

  • @Betelgeuse009
    @Betelgeuse009 Před 7 měsíci

    Очень хороший туториал по GraphQL , спасибо большое)

  • @gigakvachakhia4777
    @gigakvachakhia4777 Před rokem +2

    thank you. good one.

  • @mykhailopronin7350
    @mykhailopronin7350 Před rokem

    Man, it's amazing

  • @mahendranath2504
    @mahendranath2504 Před rokem

    Thank you so much ✌✌👍👍👌👌🙌🙌🙏🙏😍😍

  • @muratasarslan2359
    @muratasarslan2359 Před rokem +4

    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

  • @jhonjaider-ij8fd
    @jhonjaider-ij8fd Před 4 měsíci

    Excellent! thank you very much for this!

  • @ahmedmazendessouky1551

    thank you for this great video, I have a question how to exclude some routes that have @isPublic decorator in the auth context?

  • @monawwarabdullah7438
    @monawwarabdullah7438 Před rokem +5

    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 ?

    • @mguay
      @mguay  Před rokem +3

      My new Ultimate Nest.js Microservices course will cover this! Stay tuned for its release in May.

  • @mguay
    @mguay  Před rokem

    Get my highly-rated Udemy courses at a discount here: michaelguay.dev/udemy/

  • @MG-wx8yx
    @MG-wx8yx Před 3 měsíci

    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?

  • @enesgurbuz8652
    @enesgurbuz8652 Před rokem +1

    What should I do if I want to use MYSQL ???

  • @g-luu
    @g-luu Před rokem

    Thanks. Would like to see how nestjs plays with tRPC

    • @mguay
      @mguay  Před rokem +1

      Good video idea. Thanks!

  • @user-zn6yt6kw3f
    @user-zn6yt6kw3f Před 5 měsíci

    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!!

  • @saadmeddah6914
    @saadmeddah6914 Před 3 měsíci

    how to inject a laravel service into this gateway ?

  • @kamiar3001
    @kamiar3001 Před 6 měsíci

    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?

  • @codingwithnipu
    @codingwithnipu Před rokem

    can you solved the federation with subscription problem in code first?

  • @adriandrozman3404
    @adriandrozman3404 Před rokem

    Hello, any updates regarding your Udemy course? thanks!

    • @mguay
      @mguay  Před rokem

      Stay tuned for its release in May!

    • @adriandrozman3404
      @adriandrozman3404 Před rokem

      @@mguay thank you,instant buy for sure!

  • @enesgurbuz8652
    @enesgurbuz8652 Před rokem

    @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

    • @hinogi
      @hinogi Před 11 měsíci

      NestJs updated apollo to server v4 so you have to use the express server cors option.

    • @pronixpriv
      @pronixpriv Před 6 měsíci

      How did you resolve this issue?

  • @user-fs8ms2dz4p
    @user-fs8ms2dz4p Před 9 měsíci

    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