Comments (9)
There is an issue with nested fragments : right now fragments are resolved sequentially, so if query would define InputValue
fragment and then FullType
, it would work, but not other way around. I was aware of it but I didn't have time to do it yet. It will get on top of my priorities. Thank you very much for your report.
BTW First query is weird, it has selection set
directives {
name
description
args {
...InputValue
}
onOperation
onFragment
onField
}
GraphQL spec does not define onOperation
, onFragment
or onField
for __Directive
type, see http://facebook.github.io/graphql/#sec-The-__Directive-Type. Second query seems to be perfectly valid.
from kgraphql.
Maybe onOperation
, onFragment
and onField
belongs to an upcoming specification or a draft? Noticed some frameworks implementing them.
But I think it's good that you follow the official specification.
from kgraphql.
Hm, maybe. Or it was part of previous versions of spec. Anyway, I have fixed nested fragments issue and released 0.2.1 version. It contains fix for #1 too. Please try it and close this issue if effects will be satisfying.
Thank you for your input and issue reports, it is really valuable for development of this library!
from kgraphql.
Okay so graphdoc
can now execute the introspection query and create documentation. But there is something strange going on. I noticed that my query doesn't show up in the documentation. This is how it looks in my code.
query("productions") {
description = "Get list of productions"
resolver { page: Int -> streamlyResolver.listProductions(page) }
.withArgs {
arg<Int> {
name = "page"
defaultValue = 0
description = "Page number (starting from 0)"
}
}
}
If i do my own introspection query like this
{
__schema {
queryType {
name
fields {
name
description
args {
name
description
type { name description }
}
}
}
}
}
----> result --->
{
"data": {
"__schema": {
"queryType": {
"name": "Query",
"fields": [
{
"name": "productions",
"description": "Get list of productions",
"args": [
{
"name": "page",
"description": "Page number (starting from 0)",
"type": {
"name": null,
"description": "NonNull wrapper type"
}
}
]
} ...
then i can see my query. BUT neither graphdoc
or graphql-docs
use that kind of query to extract available queries from the schema. Instead I think they expect queries to show up in this.
types {
name
kind
description
...FullType
}
from kgraphql.
Someone created this mega introspection query that you could try out (- onOperation,onFragment and onField). Looks like it also expect queries to show up under "types".
from kgraphql.
Okay, I will take a look on that. I'm starting to think that adding onOperation
, onFragment
and onField
fields to __Directive
for compatibility purposes would be good idea too.
from kgraphql.
Good idea. I suggest you add onOperation, onFragment, onField
but as deprecated fields. If I understand it right they have been replaced by locations
(under directives)
Never mind .. I think location(s) where only a draft
from kgraphql.
0.2.3
version has been released, it was tested with graphql-docs
and graph-doc
and now it works just fine with creation of static documentation. onOperation
, onFragment
, onField
fields has been added to __Directive
.
Please check if it works for you. Have in mind that graphql-docs
seems to not support union types: https://github.com/mhallin/graphql-docs/blob/master/src/model.js#L3
from kgraphql.
I'm getting expected result. Good job.
from kgraphql.
Related Issues (20)
- Extension property not working HOT 1
- Support for suspendable property resolvers HOT 2
- There is no instruction to help a new user to start the server and the client in this example. How can I run the server and start query? HOT 2
- LocalDate coercion issue HOT 2
- Support for suspendable schema execution HOT 1
- Property resolver with context HOT 8
- Scalar types within variables not working HOT 1
- How would I handle query/mutation authentication? HOT 4
- Print Schema? HOT 1
- Adding Context parameter to resolver causes errors in introspection HOT 3
- Fragments not resolving correctly on same data node
- Nested Fragments fail with property does not exist HOT 2
- LocalDate when passed as query variable HOT 1
- Leaking top level
- Is this the right way with using resolvers on a type? HOT 2
- Support for suspendable unionProperty resolvers
- Implement a DataLoaderDSL for batching
- Caused by: java.lang.NoClassDefFoundError: kotlinx/coroutines/experimental/CommonPool HOT 1
- When overwriting a property, the GraphQL repeats the original property unless ignored
- release 0.3.1 build? HOT 2
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 kgraphql.