Comments (11)
#45 seems to be working, but I'm waiting for the holiday season to end before merging it.
from libgraphqlparser.
Hmm, that is a good point. I will have to think more about implementing schema parsing; reopening to track.
from libgraphqlparser.
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.
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.
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.
Found the problem: graphql/graphql-js@3f1f9f5 broke us. Working on a fix.
from libgraphqlparser.
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.
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.
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.
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.
@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)
- Why not use PEGTL instead?
- New version? HOT 8
- SONAME versioning
- Parsing query with variables HOT 1
- Compilation failed for libgraphqlparser (graphqlparser & lexer.cpp) HOT 2
- Update master to main
- Improve Readme?
- Create release to include bugfixes resolved on master HOT 1
- graphqlparser_bison: parser.ypp:8.10-12: error: invalid version requirement: 3 HOT 2
- Getting undefined reference error when trying to compile dump_json_ast.cpp
- Found PythonInterp: /usr/bin/python (found suitable version "3.10.12", minimum required is "2")
- Missing support for types implementing multiple interfaces HOT 1
- Locations not properly updated when parsing multi-line block strings
- CONTRIBUTING.md still mentions license to be BSD HOT 1
- Checked in Flex / Bison files are under GPL license HOT 3
- Build fails with latest ctypesgen HOT 1
- Missing support for extending schemas
- Remove "facebook" namespace from cpp? HOT 1
- Missing support for extending interfaces
- Missing support for extending input object types
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 libgraphqlparser.