Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[graphiql] Navigation to field defined in type extension is "disabled" #3114

Open
1 of 4 tasks
nathanwinder-perficient opened this issue Mar 28, 2023 · 1 comment
Open
1 of 4 tasks
Labels
bug graphql-language-service lsp-server graphql-language-service-server

Comments

@nathanwinder-perficient

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Given the modular schema:
users module
- modules/users/user.gql

type User {
  name: String
  nicknames: [Nickname]
}

- modules/users/nick-name.gql

type Nickname {
  name: String!
  source: User!
}

- modules/users/query.gql

extend type Query {
  me: User!
}

authorization module
- modules/authorization/user.gql

extend type User {
  roles: [Role]
}

-module/authorization/role.gql

type Role {
  id : ID!
  name: String
}

Given the query document
- queries/me.gql

query {
  me {
    name
    nicknames {
      name
    }
    roles {
      name
    }
  }
}

✔️ When I ctrl+click query.me modules/users/query.gql is opened in the editor.
✔️ When I ctrl+click query.me.name modules/users/user.gql is opened in the editor.
✔️ When I ctrl+click query.me.nicknames modules/users/user.gql is opened in the editor.
❌ When I ctrl+click query.me.roles nothing happens (however, there is basic intellisense). Expect modules/authorization/user.gql to be opened in the editor.
✔️ When I ctrl+click query.me.role.name modules/authorization/role.gql is opened in the editor.

Expected Behavior

I should be able to ctrl+click (Navigate) to a field defined in and extended type.

Steps To Reproduce

module.exports = {
  schema: "./modules/**/*.gql",
  documents: [
    "./queries/**/*.gql",
  ]
};

Module pattern

  • graphiql-umd
  • graphiql-esm
  • graphiql-commonjs

Environment

- GraphiQL Version: latest
- OS: Windows 10
- Browser: Edge
- Bundler: Webpack
- `react` Version: ^18.2.0
- `graphql` Version: ^16.6.0

Anything else?

No response

@nathanwinder-perficient
Copy link
Author

P.S. this is using the vscode extension: graphql.vscode-graphql

@acao acao added lsp-server graphql-language-service-server graphql-language-service and removed graphiql labels Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug graphql-language-service lsp-server graphql-language-service-server
Projects
None yet
Development

No branches or pull requests

2 participants