getRemoteSchema - function proposal
See original GitHub issueI think it would be useful to have such function in graphql-yoga:
export async function getRemoteSchema(uri) {
const link = new HttpLink({ uri, fetch })
const introspectionSchema = await introspectSchema(link);
const graphcoolSchema = makeRemoteExecutableSchema({
schema: introspectionSchema,
link
});
return graphcoolSchema;
}
To create easily remote schemas and merge them all.
What do you think?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
getRemoteSchema - function proposal · Issue #28
Here is the example of complex scenario: stitch remote schemas; split your local code to multiple little schemas; working with rest apis.
Read more >Remote Schemas – GraphQL Tools
Generate GraphQL schema objects that delegate to a remote server.
Read more >Learn how GraphQL remote schemas work?
A GraphQL execution engine is a program (or function) that, given an executable schema and a query (or mutation), produces a valid response....
Read more >playerx (Ezeki Zibzibadze) · GitHub - ramyasenthilarts.com
Plan and track work ... By Plan; Enterprise · Teams · Compare all ... Date, Time, JSON - scalars proposal Dec 14; getRemoteSchema...
Read more >The graphql-yoga from dotansimha - GithubHelp
getRemoteSchema - function proposal. I think it would be useful to have such function in graphql-yoga: export async function getRemoteSchema(uri) { const ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@schickling I’ve created new project @jokio/graphql, it’s graphql server, built on top of graphql-yoga. This package will solve my domain specific problems, but for now there are more generic solutions.
Here is the example of complex scenario:
example: https://github.com/jokio/graph/blob/master/src/index.ts
Please check out and if you will like any ideas I can send pull request.
Discussion
I’ve found two main issues while I was developing my package and I want to discuss:
I need this code to be async, because I’m going to make authentication if user will enable it.
graphql-yoga creates context for web sockets per operation (onOperation) and I need it to be created only once when user connects (onConnect), based on connectionParams. What was the reason of using onOperation?
My use case is to have graphql micro-services: Users, Roles, Game1, Game2, Payments and to stitch them together like that: (urls are mock)