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

visit_argument crashed. Need a few help to guide how to fix it. #53

Closed
raykin opened this issue Aug 2, 2017 · 1 comment
Closed

visit_argument crashed. Need a few help to guide how to fix it. #53

raykin opened this issue Aug 2, 2017 · 1 comment

Comments

@raykin
Copy link

raykin commented Aug 2, 2017

I use Shopify/graphql-parser to write following ruby code but crashed in C

    def visit_argument(arg)
      key = arg.name.value
      # TODO crashed in C trace
      value_obj = arg.value
    end

I debug the C code in graphql-parser, the visit_argument should defined in https://github.com/Shopify/graphql-parser/blob/master/ext/graphql_parser/graphql_ruby.c#L220
I'm new on both C and C++, so I don't know how to debug them.
I report an issue on https://github.com/Shopify/graphql-parser/issues/14 with C error trace but the shopify seems not maintenance the lib anymore.
Btw, The problem seems related to https://github.com/Shopify/graphql-parser/issues/4. But I just not understand it well.

Thanks for any help.

@swolchok
Copy link
Contributor

As Shopify/graphql-parser#4 says, you can't use value directly. Define visit_ methods for each of the subtypes of Value, either in your same visitor or in a subvisitor just for looking at arguments.

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

2 participants