Skip to main content

IDE Settings

Nau supports Apollo Config and GraphQL Config. We are testing works with VS Code extensions Apollo GraphQL Extension and GraphQL Extension.

@kazekyo/nau-config provides directives knowledge to your IDE.

Installation

npm install --save-dev @kazekyo/nau-config

Apollo Config

apollo.config.js
const { apolloConfig } = require('@kazekyo/nau-config');
const config = apolloConfig.generateConfig();
module.exports = {
client: {
...config.client,
service: {
name: 'example-app',
url: 'http://localhost:4000/graphql',
},
},
};

See here for how to set up apollo.config.js.

GraphQL Config

graphql.config.js
const { graphqlConfig } = require('@kazekyo/nau-config');
module.exports = {
schema: ['http://localhost:4000/graphql', graphqlConfig.clientSchemaPath],
documents: 'src/**/*.{graphql,js,ts,jsx,tsx}',
};

See here for how to set up graphql.config.js.