question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with Types when stitching schema

See original GitHub issue

Hi. I tried doing fetchRemoteSDL and retrieving the SDL from the remote service instead of doing introspection as mentioned here: https://github.com/gmac/schema-stitching-demos/blob/master/01-combining-local-and-remote-schemas/index.js#L30 and it worked well.

But there was a typings issue as below:

1

where the object is nothing but same as in the example:

return {
    schema: buildSchema(remoteSchema),
    executor: httpExecutor
  };

Currently, working around this by adding a ts-ignore like this:

subschemas: [
      // @ts-ignore
      {
        schema: authService.schema,
        executor: authService.executor
      }
]

Thanks.

CC: @gmac

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
gmaccommented, Nov 27, 2020

Sounds about right! Is Stitching starting to make more sense now with some concrete examples? I personally find it to be fairly intuitive given that the subservices are all plain GraphQL, versus Federation where there’s a bunch of magic happening at every layer of the stack to bring it all together.

0reactions
tvvigneshcommented, Nov 27, 2020

@gmac Stitching - Yes, Typemerging - In Progress . While I understood the concepts properly with both of ur help and have it setup as part of the stack, I am working to see how I can fit it for my usecases. Will share my progress as I go along.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Schema stitching doesn't work when mixing types merging ...
In a complex schema stiching scenarios where there are both types defined in multiple schemas and merged, and additional fields defined in ...
Read more >
GraphQL schema stitching
Schema stitching is the idea that you can take two or more GraphQL ... When you run a query, each field on the...
Read more >
Understanding schema stitching in GraphQL - LogRocket Blog
In this tutorial, you can learn what schema stitching is, why it is necessary, and how to stitch schemas together in GraphQL.
Read more >
Combining Schemas – GraphQL Tools
Stitching has two strategies for handling types duplicated across subschemas: an automatic merge strategy (default), and an older manual ...
Read more >
The ultimate guide to Schema Stitching in GraphQL - Hasura
An example-driven guide for understanding schema stitching in order to customize existing GraphQL API(s)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found