Comments (6)
world
is a TextInput
in your example, not a String, so the correct query should be (but I haven't run it):
{
hello(world: {text: {value: "World"}})
}
So, the query is indeed invalid but the error message is a bit misleading.
(Or the schema/query you supplied is not the one that produced the error?)
from graphql-clj.
My mistake. Corrected the query to yours, but same problem.
{
"errors": [
{
"error": "Argument 'world' of type 'WorldInput' has invalid value: {text: [:object-value {:value World}]}. Reason: Expected 'WorldInput', found not an object.",
"loc": {
"line": 2,
"column": 16
}
}
]
}
from graphql-clj.
I am not sure whether nested input type are supposed to work or not.
Input Type is defined in GraphQL Spec:
GraphQL describes the types of data expected by query variables. Input types may be lists of another input type, or a non‐null variant of any other input type.
Variables can only be scalars, enums, input objects, or lists and non‐null variants of those types. These are known as input types. Objects, unions, and interfaces cannot be used as inputs.
from graphql-clj.
Just found this from type system definition:
An Input Object defines a set of input fields; the input fields are either scalars, enums, or other input objects. This allows arguments to accept arbitrarily complex structs.
Nested input type should be supported.
from graphql-clj.
Currently parser treats input values as object values which is incorrect.
We need enhance the parser and validator to support this case.
from graphql-clj.
This issue is fixed in latest version.
from graphql-clj.
Related Issues (20)
- spec/format for "Transformed Map" HOT 2
- Simplified Executor
- Generic data-loader
- Resolver function
- Reduce the size of validated schema and statement
- Validator error: "clojure.spec$nilable_impl$reify__41165 cannot be cast to clojure.lang.Named" HOT 2
- Passing variables with keyword keys doesn't work HOT 3
- Missing validation of dissimilar variable list types HOT 1
- Tries to load spec under Clojure 1.8 and breaks HOT 2
- Unknown argument ... on field ... of type ... HOT 4
- Is it possible to define a custom scalar ? HOT 2
- Cannot query field '__typename' HOT 4
- List type argument seems to become lost HOT 3
- Is it possible to get the info parameter in resolvers? HOT 1
- Documentation
- Schema utilities
- If required field return nil, the connection is close, but no exception is thrown
- The '!' doesn't work in the Input
- Implement "extend type ..." HOT 7
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-clj.