Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug if a parameter has "query" as its name #29

Closed
maarekj opened this issue Apr 29, 2018 · 4 comments
Closed

Bug if a parameter has "query" as its name #29

maarekj opened this issue Apr 29, 2018 · 4 comments

Comments

@maarekj
Copy link

maarekj commented Apr 29, 2018

Bug if a parameter has "query" as its name.

Example:

module SearchQuery = [%graphql
    {| query search_users($query: String!) {
            search(query: $query, page: 1) {
                id
                name
            }
        }
    |} ];
@mhallin
Copy link
Owner

mhallin commented May 19, 2018

Trick! This is solved by a band-aid solution in 0.2.2.

@mhallin mhallin closed this as completed May 19, 2018
@Coobaha
Copy link

Coobaha commented May 21, 2018

@mhallin This band-aid solution makes generated code not compatible with ReasonApollo :/

module type Config = {let query: string; type t; let parse: Js.Json.t => t;};

@mhallin
Copy link
Owner

mhallin commented May 21, 2018

I see. It's unfortunate that ReasonApollo depended on the undocumented query module member, but I suppose it's technically part of the public interface. I'll apply one more band-aid solution to un-break this.

@mhallin
Copy link
Owner

mhallin commented May 22, 2018

Alright, release 0.2.3 should fix both this issue and re-expose the query member.

@mhallin mhallin closed this as completed May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants