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.

getting unknown fragment lint error

See original GitHub issue

Actual Behavior

we are using Relay and after the recent updates(starting from version 0.3.23), all the fragments are getting flagged as unknown fragment.

Expected Behavior

Steps to Reproduce the Problem Or Description

Specifications

  • GraphQL for VSCode Extension Version: > 0.3.23
  • VSCode Version: Version: 1.61.0 (Universal)
  • OS Name: Mac OS
  • OS Version: Big sur 11.6.1
  • graphql config filename and format example:

Logs Of TS Server || GraphQL Language Service

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:6
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

5reactions
xorander00commented, Apr 14, 2022

Just tested it out again a few more times since I wasn’t 100% sure it wasn’t some weird anomaly. I can confirm that the following happens (in my case at least):

  1. Open query document for editing (myQuery.graphql), see LSP report unknown fragment errors.
  2. Open document that defines fragments (myFragments.graphql) in same instance of editor+lsp.
  3. Insert newline, delete newline, and then save myFragments.graphql.
  4. Switch back to myQuery.graphql, insert newline, delete newline, and then save myQuery.graphql.
  5. Watch errors instantly disappear and completions are now available for fragment types.
3reactions
esquevincommented, Jan 15, 2022

I’m using this

{ 
  "schema": "./graphql-schema.json",
  "documents": "src/**/*.{graphql,js,ts,jsx,tsx}"
 }
Read more comments on GitHub >

github_iconTop Results From Across the Web

[GraphQL error]: Message: Unknown fragment - Stack Overflow
Ok, I use webpack encore with symfony and created a custom loader: with the description form the docs - before I did this...
Read more >
Fragments - Relay
We use our lint rule to enforce that the type of the fragment reference prop is correctly declared when using useFragment . By...
Read more >
Apollo extension for VS Code - Apollo GraphQL Docs
The Apollo VS Code extension provides an all-in-one tooling experience for developing apps with Apollo. Using jump to definition on a fragment.
Read more >
Android Lint Checks - Android Studio Project Site
Once the import is there you might get a lot of "confusing" error messages ... After creating a FragmentTransaction, you typically need to...
Read more >
Lint error: package fragment is not found for module ...
We have checkDependencies=true on our app module and apply there custom lint checks. Disabling custom lint checks has not solved the issue, though...
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