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.

Support external directives

See original GitHub issue

Currently, writing client-side documents with the @client directive yields various errors in VS Code:

capture d ecran du 2018-07-22 12 59 21

In this example, setShowSignIn is marked as not found in the schema, and @client as unknown directive.

More info on client-side GraphQL.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
divyenduzcommented, Aug 6, 2018

@frandiox : Sure, my intention was that if a valid AST is generated that means directive syntax is correct. What does your last attempt look like? I think it should be like

- directive @client on FIELD_DEFINITION

1reaction
frandioxcommented, Aug 6, 2018

@divyenduz I see, I misunderstood the explanation. This works:- directive @client on FIELD 🎉

The only error remaining is that @client queries/mutations are still validated against the app “remote” schema instead of the local apollo-link-state. Therefore, a mutation like setLocalUser is not found on the remote type Mutation. I guess this requires some big changes.

Thanks for your patience!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Federation-specific GraphQL directives
Federation-specific GraphQL directives. Apollo Federation defines a collection of directives that you use in your subgraph schemas to enable certain features.
Read more >
Support external directives · Issue #2329 · graphql/graphiql
Currently, writing client-side documents with the @client directive yields various errors in VS Code: In this example, setShowSignIn is marked as not found ......
Read more >
#ExternalSource Directive - Visual Basic | Microsoft Learn
This directive is used only by the compiler and the debugger. A source file may include external source directives, which indicate a mapping ......
Read more >
Federated Directives | GraphQL Kotlin
The @external directive is used to mark a field as owned by another service. This allows service A to use fields from service...
Read more >
External optimizer directives - IBM
You can define external directives by creating association records that include query optimizer directives, and saving those records in the sysdirectives ...
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