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.

Directives _mappedType, _mappedInputField and _mappedOperation not in schema

See original GitHub issue

SPQR adds the directives _mappedType, _mappedInputField and _mappedOperation to types, fields, queries and more. When doing introspection on the schema (for example with the query graphql.introspection.IntrospectionQuery.INTROSPECTION_QUERY) the three directives are not listed as part of the schema. Some query validations in apollo throw errors due to the fact that the definition of the directives is not in the schema.

Is there a way to get the definition of the directives in the schema?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:20 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
ankit-joinwalcommented, Jun 6, 2021

Here is a working example of how to use SPQR with Apollo Federation https://github.com/ankit-joinwal/graphqpl-spqr-federation-poc

2reactions
TuomasKiviahocommented, Oct 5, 2019

I stumbled on the internals by using graphql.schema.idl.SchemaPrinter to see what was generated and wondered what these directives were and what they would mean from the clients perspective. I wonder if these is some way to exclude them from the schema before printing it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Directives (GraphQL SPQR 0.10.0 API) - javadoc.io
public class Directives extends Object ... static boolean, isMappedType(graphql.schema. ... GraphQLDirective mappedInputField(InputField inputField) ...
Read more >
leangen/graphql-spqr - Gitter
The new directives ( @_mappedType and @_mappedOperation ) store the underlying Java types and fields so that that they remain accessible to instumentations...
Read more >
graphql.schema.GraphQLDirective Java Examples
This page shows Java code examples of graphql.schema. ... private String directiveDefinitions(List<GraphQLDirective> directives) { StringBuilder sb = new ...
Read more >
io.leangen.graphql.util.Directives.mappedType java code examples ...
builder.withDirective(Directives.mappedType(javaType));
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