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.

Use with VSCode-graphql

See original GitHub issue

I am trying to use https://github.com/prismagraphql/vscode-graphql for Intellisense autocompletion/in-editor queries etc.

When executing a query using the extension, I get the following error:

Error: Network error: When parsing the constructor GraphQLRequest of type Hasura.GraphQL.Transport.HTTP.Protocol.GraphQLRequest expected Object but got Array.

My .graphqlconfig looks like this:

{
  "projects": {
    "Faberge": {
      "schemaPath": "./schema.graphql",
      "extensions": {
        "endpoints": {
          "default": "http://localhost:8080/v1alpha1/graphql"
        }
      }
    }
  }
}

Is there something more I need to do in order to get the correct response ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
shahidhkcommented, Mar 27, 2019
2reactions
buzinascommented, Feb 26, 2019

@Jayphen I know you asked specifically about stpn.vscode-graphql, but I use apollographql.vscode-apollo, and it works like a charm for me. This is my apollo.config.js file:

module.exports = {
  client: {
    service: {
      name: 'your-project-name',
      url: 'http://localhost:8080/v1alpha1/graphql',
    },
    includes: ['**/queries/**/*.{gql,graphql}'], // change this to your pattern
  },
}

apollo-vscode

PS: you don’t need to use Apollo in your project to take advantage of its VS Code extension.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GraphQL: Language Feature Support
Extension for Visual Studio Code - GraphQL LSP extension that adds autocompletion, validation, go to definition, hover, outline and more.
Read more >
Apollo extension for VS Code - Apollo GraphQL Docs
The VS Code extension will show inline performance diagnostics when connected to a service with reported metrics in Apollo Studio. As operations are...
Read more >
Setting up Visual Studio Code for client-side GraphQL ...
First of all, you need to install the GraphQL extension from Prisma. Then, create a Hasura server using Heroku or your favorite provider,...
Read more >
Guides: Visual Studio Code Setup | Hasura GraphQL Docs
If you use Visual Studio code, the Apollo GraphQL plugin can improve your development experience significantly by enabling a lot of cool features...
Read more >
What GraphQL VSCode extension - Reddit
Ideally I simply want intellisense based on a local, static schema.graphql, and both apollo and prisma are built around a strong assumption ...
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