Closed IanVS closed 2 years ago
Woah! last I updated this there wasn't support, but I introduced a PR for TS and TOML support so maybe they merged it, cool!
this was added in the latest release, but there are other issues which may cause editor features to not load.
I am still getting this error when trying to use a .ts config with version 4.1.0
import type { IGraphQLConfig } from 'graphql-config';
const config: IGraphQLConfig = {
schemaPath: './schema.graphql',
documents: ['./src/**/*.graphql'],
extensions: {
endpoints: {
default: {
url: `https://graphql.contentful.com/content/v1/spaces/${process.env.NEXT_PUBLIC_CF_SPACE_ID}`,
headers: { Authorization: `Bearer ${process.env.NEXT_PUBLIC_CF_DELIVERY_ACCESS_TOKEN}` },
},
},
},
};
export default config;
this was added in the latest release, but there are other issues which may cause editor features to not load.
Can you advise what the other issues are? I'm still seeing "ConfigNotFoundError2: GraphQL Config file is not available in the provided config directory", but i'm not sure what to check next
Actual Behavior
Attempting to use a typescript config file results in:
It looks like
graphql.config.ts
is supported bygraphql-config
: https://graphql-config.com/introduction#graphqlconfigts-or-graphqlrctsExpected Behavior
I should be able to export a config from a typescript file.
Steps to Reproduce the Problem Or Description
Define a config using a typescript file.
Specifications
Logs Of TS Server || GraphQL Language Service