Giter Club home page Giter Club logo

Comments (11)

swolchok avatar swolchok commented on May 3, 2024 3

#45 seems to be working, but I'm waiting for the holiday season to end before merging it.

from libgraphqlparser.

swolchok avatar swolchok commented on May 3, 2024 1

Hmm, that is a good point. I will have to think more about implementing schema parsing; reopening to track.

from libgraphqlparser.

aarvay avatar aarvay commented on May 3, 2024

Defining and parsing schema is an implementation's job as each implementation will have its own better way of doing it, mostly based on what the language the implementation is written in, offers.

However, there're actually quite a lot of the language spec that needs to be implemented here.
For a start, this test needs to get passed.

from libgraphqlparser.

schloerke avatar schloerke commented on May 3, 2024

Fair.

You're correct. It doesn't like the kitchen sink. :-(
So what you're saying is that I should look elsewhere for an query parser, as this one is not complete? I really enjoy the json output that you provide.

from libgraphqlparser.

swolchok avatar swolchok commented on May 3, 2024

It doesn't like the kitchen sink. :-(

Hmm, that's strange. I missed this bug report because this issue is marked as being about schema parsing and I was busy with end-of-year stuff. I'll look into why the kitchen sink test is failing.

from libgraphqlparser.

swolchok avatar swolchok commented on May 3, 2024

Found the problem: graphql/graphql-js@3f1f9f5 broke us. Working on a fix.

from libgraphqlparser.

swolchok avatar swolchok commented on May 3, 2024

8feed9c fixes parsing of kitchen-sink.graphql.

As to the original question about adding schema parsing to this project, I would take a patch that added schema parsing so long as it could be disabled at build time (and, probably, was disabled by default), but I probably won't add it myself.

Here's my underlying philosophy on why it should be optional: The main reason to do a C++ implementation of anything, in my opinion, is performance, and the main environment where I expect high-performance GraphQL parsing to matter is server-side. Servers probably don't need to parse the schema language, at least not after startup, and they very probably should not accept schema definitions as part of incoming queries.

from libgraphqlparser.

swolchok avatar swolchok commented on May 3, 2024

By the way, if you find more spec-compliance bugs in libgraphqlparser, please report them and I will fix them quickly! I consider them to be very serious; this one just slipped through the cracks. :(

from libgraphqlparser.

schloerke avatar schloerke commented on May 3, 2024

Thank you for the fix!

(small) Rebuttal for the schema... It is fairly easy for me to call C++ that returns JSON and parse the JSON output. It is MUCH more difficult to create / maintain a text parser to parse the schema in a language that hates strings. Yes, parsing the schema's would only be done once, but it'd be done with the same mechanism (or something similar) as the queries.

Unfortunately, my C++ skills are not up to this level... so we'll leave it as it. ;-)

from libgraphqlparser.

aarvay avatar aarvay commented on May 3, 2024

Thanks for the fix. And I concur with @swolchok, regarding supporting schema parsing. Schema definitions can take its own form. It needn't be "strings"! :)

from libgraphqlparser.

rivanov2 avatar rivanov2 commented on May 3, 2024

@swolchok Hi,

First of all, thank you for making this fantastic library.

I'm currently in a position that necessitates me to write a schema parser, or a whole ODB wrapper.
My intention was to use ODB -> postgraphql -> schema parser (custom) -> libgraphql -> restbed to implement a graphql-server.

Any ideas whether or not you'll be implementing a schema-parser? I'd love to contribute my implementation to this project when it's complete.

Cheers!

from libgraphqlparser.

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.