graphql / graphiql

GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.
MIT License
16.01k stars 1.71k forks source link

SDL field type autocomplete is broken #2422

Open acao opened 2 years ago

acao commented 2 years ago

For some reason, the SDL field type definitions when defining a type or interface are way off. You only see scalars and enums, and occassionally... input types? but no types at all... seeing this in both monaco and vscode so I'll mark this as a regression in the language service

jake-ruth-qm commented 1 year ago

Any update on this? I seem to get this when I am switching workspaces since I have multiple set up in a monorepo:

My graphql.config.js looks like this

module.exports = {
    projects: {
      "project1": {
        schema: ['apps/project1/src/graphql/schema/**.graphql'],
        documents: ['apps/project1/src/graphql/schema/*.{graphql,js,ts,jsx,tsx}'],
      },
       "project2": {
        schema: ['apps/project2/src/graphql/schema/**.graphql'],
        documents: ['apps/project12/src/graphql/schema/*.{graphql,js,ts,jsx,tsx}'],
      },
    },
  };

When I reload the VS code window and stay in one workspace it works as expected. But switching between these two causes the issue above