Git Product home page Git Product logo

Comments (5)

rmosolgo avatar rmosolgo commented on August 28, 2024 1

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.

davidnorth avatar davidnorth commented on August 28, 2024

@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.

rmosolgo avatar rmosolgo commented on August 28, 2024

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.

davidnorth avatar davidnorth commented on August 28, 2024

Sure, I'll look into that some more, I think its just the validator.

from graphql-ruby.

davidnorth avatar davidnorth commented on August 28, 2024

Default values are working fine, I needed to remove the '!' from that args type to allow null.

from graphql-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.