Open vincentwinkel opened 3 years ago
[disclaimer] I cannot create my issue from https://cmty.app/nuxt/issues/new?repo=apollo-module since this website is down.
Is it possible to use a SchemaLink instead of a HttpLink, being able to use local mocks? I would like to do something like this:
import { makeExecutableSchema } from '@graphql-tools/schema'; import { addMocksToSchema } from '@graphql-tools/mock'; import { SchemaLink } from '@apollo/client/link/schema'; import typeDefs from './mock/schema'; import resolvers from './mock/resolvers'; const schema = makeExecutableSchema({ typeDefs, resolvers }); const schemaMock = addMocksToSchema({ schema }); const schemaLink = new SchemaLink({ schema: schemaMock }); export default (context) => ({ schemaLink });
[disclaimer] I cannot create my issue from https://cmty.app/nuxt/issues/new?repo=apollo-module since this website is down.
Is it possible to use a SchemaLink instead of a HttpLink, being able to use local mocks? I would like to do something like this: