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

Unable to use extension, Logs & Config Provided in Description #278

Open
fledgling-vish opened this issue May 13, 2020 · 6 comments
Open

Comments

@fledgling-vish
Copy link

fledgling-vish commented May 13, 2020

Hi,
I followed the setup carefully & the extension is running without any errors. But, none pf the feature seems to work.

/* .gqlconfig */
{
    schema: {
        files: 'schemas/*.graphql'
    },
    query: {
        files: [ /* define file paths which you'd like  the gql parser to  watch and give autocomplete suggestions for */
            {
                match: ['server/src/**/*.js', 'server/src/**/*.ts'],
                parser: ['EmbeddedQueryParser', { startTag: 'gql`', endTag: '`' }]
            }
        ]
    }
}

Logs from the plugin

[2020-05-12T22:28:27.673] [INFO] gql-language-server - running in node v12.8.1 (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer))
[2020-05-12T22:28:27.677] [INFO] load-gql-service - loading @playlyfe/gql...
[2020-05-12T22:28:27.917] [INFO] load-gql-service - using @playlyfe/gql from path /Users/bar/Developer/work/foonodeweb/node_modules
[2020-05-12T22:28:27.920] [INFO] gql-language-server - starting gql service...
[Watch established (gqlSchemaFiles)] 
	basePath: /Users/bar/Developer/work/foonodeweb 
	RelativePath: undefined 
	Files: "schemas/*.graphql"
[Watch established (gqlQueryFiles-0)] 
	basePath: /Users/bar/Developer/work/foonodeweb 
	RelativePath: undefined 
	Files: [
  "server/src/**/*.js",
  "server/src/**/*.ts"
]
[2020-05-12T22:28:28.162] [INFO] gql-language-server - gql service started
[2020-05-12T22:28:28.162] [INFO] gql-language-server - gql-language-server started
[2020-05-12T22:28:28.166] [INFO] gql-language-server - Dynamically registering capabilities for documents matching [
  {
    "scheme": "file",
    "pattern": {
      "base": "/Users/bar/Developer/work/foonodeweb",
      "pattern": "**/*.{graphql,js,ts}"
    }
  }
]
@fledgling-vish
Copy link
Author

The project structure is as follows
foonodeweb/.gqlconfig
foonodeweb/server/src/helpers/*.js

Let me know if more info is needed. Will appreciate any help

@kumarharsh
Copy link
Owner

Hi, do you have schemas defined and put in the foonodeweb/schemas folder? If they are in a subfolder within schemas, you'd also need to change the gqlconfig.schema.files config to schemas/**/*.graphql. Please let me know

@fledgling-vish
Copy link
Author

fledgling-vish commented May 13, 2020

@kumarharsh I have only one schema file under schemas folder.
schemas/schema.graphql

@fledgling-vish
Copy link
Author

@kumarharsh The schema contains description comments. Is it possible that it is causing any issues?

type Account {
  """
  List of owners in the account. There should be only one primary account owner
  which is mentioned in their role_type.
  """
  individualOwners: [IndividualOwner]!

  """
  Business entity of the account
  """
  businessEntity: Business

  """
  An array of PayPal products to which the partner wants to onboard the customer.
  """
  products: [ProductCode]

  """
  An array of operations to perform for the customer while they share their data.
  """
  operations: [Operation]

  """
  Agreements associated with the account
  """
  agreements: [Agreement]

  """
  The partner's unique identifier for this customer in their system which
  can be used to track user in PayPal.
  """
  trackingId: String

  """
  Email address of the customer used to create the account
  """
  email: String
  capabilities: [Capability]
  processView: ProcessView

  """
  The country identifier for the country the account will be based under
  """
  legalCountry: CountryCode

  """
  The primary currency code of the account.
  """
  primaryCurrencyCode: String!
  id: String!
}

I found some more information here graphql/graphql-js#927. A flag is required to properly parse schema with such description comments.

@kumarharsh
Copy link
Owner

Yeah, that's a limitation of this extension - being tracked at Mayank1791989/gql#143. Right now, I can't give a timeline on when it'll be fixed. See if converting to the older # prefixed descriptions fix this issue?

@khacminh
Copy link

Seem the projects are abandoned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants