graphql-rust / graphql-parser

A graphql query language and schema definition language parser and formatter for rust
Apache License 2.0
355 stars 77 forks source link

Expose `crate::common` utils #63

Closed dotansimha closed 9 months ago

dotansimha commented 2 years ago

This PR exports create::common utils.

Libraries that use graphql_parser often need to be able to deal with some raw values, so exposing common module can help and simplify some of that. (for example: parse_value is super useful if you are trying to understand what is the default value of an argument when it's coming from an introspection JSON).

dotansimha commented 2 years ago

@tailhook any chance we can get this merged?

tailhook commented 2 years ago

I don't think that exporting * is a good idea here. Those parsers are meant to be private API, that can be restructured at any time. Also we don't expose TokenStream anywhere, I think. So they will be unusable.

I'm not against exposing some parse_value(&str) -> Result<Value> wrapper.

(sorry for late reply)