We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there, I have a server-side rendering use-case and I wrote a thing for it. It lets you use Envelop with Apollo client.
import * as graphqlJs from 'graphql' import { ApolloClient, gql, InMemoryCache } from '@apollo/client' import { EnvelopSchemaLink } from '@envelop/apollo-client' import { envelop, useEngine, useSchema } from '@envelop/core' import { makeExecutableSchema } from '@graphql-tools/schema' let schema = makeExecutableSchema({ typeDefs: `type Query { hello: String! }`, resolvers: { Query: { hello: () => 'world' } } }) // Use any enveloped setup let getEnveloped = envelop({ plugins: [useEngine(graphqlJs), useSchema(schema)] }) let envelope = getEnveloped() let apollo = new ApolloClient({ cache: new InMemoryCache(), // Pass it to EnvelopSchemaLink link: new EnvelopSchemaLink(envelope) }) // Use Apollo let result = await apollo.query({ query: gql` query { hello } ` }) console.log(result)
Here's the diff, would you accept a PR similar to this? https://github.com/n1ru4l/envelop/compare/main...vladinator1000:envelop:apollo-schema-link?expand=1
The text was updated successfully, but these errors were encountered:
Wow that looks awesome ! A PR would be very welcomed !
Sorry, something went wrong.
@EmrysMyrddin 🚀 #2257
No branches or pull requests
Hi there, I have a server-side rendering use-case and I wrote a thing for it. It lets you use Envelop with Apollo client.
Example
Contribution
Here's the diff, would you accept a PR similar to this?
https://github.com/n1ru4l/envelop/compare/main...vladinator1000:envelop:apollo-schema-link?expand=1
The text was updated successfully, but these errors were encountered: