Comments (12)
Alright I think we're in business now. I was able to reproduce your issue in insomnia
. There was an error when pulling in the locations for directives. It should be fixed now in v0.0.8
. Sorry for the inconvenience!
from graphql.
Hey @danielvladco! Thanks for opening this. I think this issue belongs in the nautilus/graphql package. I'll move it over there for you.
I have some time to investigate this today so hopefully I'll have something for you soon
from graphql.
Okay so I've tried to see if I can reproduce your problem and I think I need a bit more information.
I ran the following code in a script and was able to find the fields for an input type:
// introspect the apis
schemas, err := graphql.IntrospectRemoteSchemas(
"https://api.graphql.jobs/",
)
if err != nil {
panic(err)
}
fmt.Println(schemas[0].Schema.Types["TagWhereInput"].Fields)
Is the payload you posted above a response from introspecting the gateway? Or is that the introspection query to one of the backend services?
from graphql.
Hi @AlecAivazis ,
Thanks for quick reply,
run this piece of code:
schemas, err := graphql.IntrospectRemoteSchemas(
"https://api.graphql.jobs/",
)
if err != nil {
panic(err)
}
, _ := json.Marshal(schemas[0].Schema.Types["TagWhereInput"])
fmt.Printf("%s/n", string(b))
notice how Kind
field for input type is empty, when it's expected to be INPUT_OBJECT
also there are Fields but for some reason all their fields are resolved to zero values except for field Name
and Type
You can introspect the endpoint directly and see all the mismatching fields.
from graphql.
Ah yea I noticed a similar inconsistency today while digging through this. I'll try to have a fix for you very soon. Sorry about this!
from graphql.
Okay i just pushed a fix that assigns the right Kind
to input objects. I tested the script again and am able to interact with the API through the playground provided by the gateway.
Looking at the introspection query used in the gateway (the same used by most libraries) we only ask for name
, description
, defaultValue
, and type
information on input objects. Is something missing that you usually see with other introspections?
from graphql.
@danielvladco are you still seeing issues?
from graphql.
@AlecAivazis Unfortunately yes,
I use Insomnia as my graphql client and when it's trying to do introspection query I receive this error:
however when I use direct link It works fine
from graphql.
Okay that’s progress! Looks like insomnia is expecting a directive to be defined that isn’t. I’ll go download it and give it a try
from graphql.
Thanks, It seems to work now
You forgot a print here https://github.com/nautilus/graphql/blob/master/introspection.go#L196
:)
from graphql.
Whoops! Thanks for catching that. It should be gone now 😄
from graphql.
@danielvladco @AlecAivazis
In a real production ready example, there is no schema registry involved with nautilus?
"http://localhost:3004/query",
"http://localhost:3002/query",
"http://localhost:3006/query",
How do you dynamically update the service list?
from graphql.
Related Issues (13)
- Bundle requests to the same service in one query
- Implement a vektah/gqlparser native query printer HOT 1
- operationName is empty when request for introspection service HOT 3
- ..\github.com\carted\graphql\language\printer\printer.go:372:9: undefined: ast.NullValue HOT 1
- [discussion][enhancement] middleware for introspection call HOT 3
- Union / fragments handling error in 0.0.17 HOT 8
- [Question] : Do we have retry option for IntrospectAPI(). HOT 1
- IntrospectAPI support authorization HOT 1
- The default graphql @deprecated directive is skipped HOT 1
- Formatting and re-parsing IntrospectAPI's AST result fails as an invalid schema
- Cannot use object fragment on interface: Fragment cannot be spread here as objects of type "Node" can never be of type "Foo" HOT 1
- graphql doesn't support directive with default value and mismatch with gqlparser HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphql.