graphql icon indicating copy to clipboard operation
graphql copied to clipboard

fix: federation schema builder

Open endroca opened this issue 2 years ago • 7 comments

Referer: https://github.com/nestjs/graphql/pull/1780

## PR Checklist Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • [x] Bugfix
  • [ ] Feature
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] CI related changes
  • [ ] Other... Please describe:

What is the current behavior?

Issue Number: #1597

What is the new behavior?

The generated schema contains also the directives needed for the federation.

Does this PR introduce a breaking change?

  • [x] Yes
  • [ ] No

Other information

endroca avatar Mar 04 '22 18:03 endroca

@kamilmysliwiec Thanks for the great framework! Anyway we could speed up this PR? It's a blocker for us.

Andrius0124 avatar Mar 29 '22 20:03 Andrius0124

@kamilmysliwiec Thanks for the great framework! Anyway we could speed up this PR? It's a blocker for us.

@Andrius0124 A temporary solution that i am using in my projects

      transformSchema: (schema) => {
        writeFileSync(
          join(process.cwd(), 'src/schema.gql'),
          printSubgraphSchema(schema),
        );
        return schema;
      },

I hope it helps

endroca avatar Mar 30 '22 12:03 endroca

@endroca Huge help! Works like a charm! Thanks

Andrius0124 avatar Mar 30 '22 21:03 Andrius0124

Looking forward to it!

Francismb avatar Apr 22 '22 06:04 Francismb

Hello! Ran into this issue and journeyed along the various issues reported to end up on this PR. Any updates on the status of this getting merged or input on new solutions w/the more recent package updates?

mandajoan avatar Mar 17 '23 20:03 mandajoan

I can confirm this is still a problem.

renanpupin avatar Feb 01 '24 17:02 renanpupin