Closed HosseinAgha closed 2 years ago
I'm also struggling with this and even doing something like this has no effect:
// graphql.config.ts
import type { IGraphQLProject } from 'graphql-config'
const apolloRestSchema = require.resolve('apollo-link-rest/schema.graphql')
const config: IGraphQLProject = {
schema: ['http://localhost:4000/graphql', 'lib/rest.graphql'],
documents: 'graphql/*.graphql',
include: [apolloRestSchema],
all directives you intend to complete for need to be included in schema
. adding them to include
probably won't help.
this should help!
graphql/graphiql#2329
Actual Behavior
I get the
Unknown directive "@rest". GraphQL: Validation
error but I don't get the same error when I run apollo-codegen.Expected Behavior
The predefined apollo client directives should be added by default.
Specifications
Logs Of TS Server || GraphQL Language Service
I don't see any errors in the
GraphQL Language Service
output.