graphql-parser icon indicating copy to clipboard operation
graphql-parser copied to clipboard

Expose `crate::common` utils

Open dotansimha opened this issue 2 years ago • 2 comments

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 avatar Jan 29 '22 11:01 dotansimha

@tailhook any chance we can get this merged?

dotansimha avatar Feb 06 '22 07:02 dotansimha

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)

tailhook avatar Feb 16 '22 21:02 tailhook