question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The parent selection or operation does not resolve to a valid schema type

See original GitHub issue

Before you create the issue

Version and Environment Details

Operation system: Ubuntu 20

IDE name and version: WebStorm 2020.2 EAP, Build #WS-202.4357.21, built on May 26, 2020

Plugin version: 2.4.0

Steps to Reproduce / Link to Repo with Reproduction and Instructions

I use graphql-modules on the server, and in my web app I have a .tsx file with this query

gql`
    query($id: ID!) {
      product(id: $ID) {
        id
      }
    }
  `

On the server, the schema looks like this:

export const ProductModule = new GraphQLModule({
  imports: [
    AuthModule,
  ],

  typeDefs: gql`
    scalar DateTime

    input ProductInput {
      ...
    }

    "Alias: Item"
    type Product {
      id: ID!
      "Alias: title"
      name: String!
      ...
    }

    type Query {
      "Find product by id"
      product(id: ID!): Product
      ...
    }

I can work on a reproduction repo upon request.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

2reactions
vepanimascommented, Aug 30, 2020

@davoam thank you for the info, that’s very helpful! I’m working now on improving the user experience for the case when some types/fields are duplicated. It definitely shouldn’t break such features as resolve and autocomplete, and the errors should be more meaningful.

0reactions
vepanimascommented, Sep 2, 2020

@dandv it should work better with graphql-modules in the 2.6.0 version, so I’m closing this now. If you encounter any problems, please feel free to report them, it will be very appreciated!

Read more comments on GitHub >

github_iconTop Results From Across the Web

The parent selection or operation does not resolve to a valid ...
I have a script which generates GraphQL schema. When I run it, it uses some files to generate final schema. It complained that...
Read more >
GraphQL queries showing error in the .graphQl file
@DanielRearden Unknown field : The parent selection or operation does not resolve to a valid schema type. – Jigsaw. Aug 27, 2019 at...
Read more >
GraphQL schema basics - Apollo GraphQL Docs
Your GraphQL server uses a schema to describe the shape of your available data. This schema defines a hierarchy of types with fields...
Read more >
Developer guide · JS GraphQL IntelliJ Plugin
This developer guide covers how to setup your project to get the most out of the GraphQL language tooling in this plugin.
Read more >
Featured Plugin: JS GraphQL | The WebStorm Blog
The plugin will check that all the types you've used are defined somewhere in the file, and it will show an error message...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found