Comments (5)
I think it's a quotation-mark issue! Sorry the error isn't too helpful. From the spec:
Strings are sequences of characters wrapped in double‐quotes (").
This works ok for me:
GraphQL.parse(%|{ some_model(id: 1) { id, greeting(name: "John") } }|)
# => #<GraphQL::Language::Nodes::Document:0x007fcae3881840
Again, sorry about the error. They just bubble up from Parslet and I don't want to spend a lot of time on them because I really just want to use libgraphqlparser
for parsing instead!
from graphql-ruby.
@rmosolgo Many thanks, that also works for me - I still need to study the spec more closely.
One other thing I noticed is that default values for arguments seem to not be implemented. I will have a go at a fix for this unless you happen to be working on that already.
from graphql-ruby.
Oh, really?! I thought it was in tip-top shape on the latest version (0.10.1), but certainly if something is missing there, please report it or open a PR!
from graphql-ruby.
Sure, I'll look into that some more, I think its just the validator.
from graphql-ruby.
Default values are working fine, I needed to remove the '!' from that args type to allow null.
from graphql-ruby.
Related Issues (20)
- Upgrade to 2.3.8 breaks subscriptions in the schema HOT 3
- Error paths and locations are duplicated with duplicate queries that error lazily
- Schema parsing fails when a union has a leading pipe HOT 1
- graphql_name does not take effect HOT 2
- Rationale for the "defaultValueInvalidOnNonNullVariable" validation HOT 2
- the GraphQL::Schema::Field initialize , ` type` is nil after upgrading GraphQL to the latest version? HOT 5
- Parser does not allow operation names that match the built in operation types HOT 1
- Audit `compare_by_identity` usage
- Query complexity check causes wrong GraphQL error response HOT 8
- Error with undefined method `types' for nil:NilClass when running rspec HOT 6
- Version 1.9.18 is not working in Ruby 3.3.3 HOT 3
- NoMethodError - `context.types` not populated in 2.3.8 HOT 4
- C Parser incompatibility with AST nodes HOT 6
- Multiple tracers in one schema are ignored HOT 15
- Multiplexed mutations fail to share dataloader results and result in a "circular dependency" error HOT 4
- Adding a resolver to a new type causes `Can't determine the return type` error HOT 3
- Fiber dependency is making all requests fail on Rails 7.0 HOT 4
- Feature request to add a flag to identify if a list was scoped
- undefined method 'using_ast_analysis?' HOT 3
- Test helper run_graphql_field does not autoload arguments with graphql-batch HOT 4
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-ruby.