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

console.log(binding) throws error [depends on nodejs/node#10731] #73

Closed
abhiaiyer91 opened this issue Mar 30, 2018 · 10 comments
Closed

Comments

@abhiaiyer91
Copy link
Collaborator

  1. Github Binding example doesnt run: GraphQLError: Syntax Error: Unexpected Name "GitObject"
  2. Creating the minimal example throws:
    Cannot convert a Symbol value to a string
  3. Adding a binding to info.test.ts to assert properties gets:
    Cannot convert a Symbol value to a string

Seems like this module doesnt actually work?

@abhiaiyer91
Copy link
Collaborator Author

Heres a stack trace from the error:

  Object.getTypeForRootFieldName (src/utils.ts:65:21)
  buildInfoForAllScalars (src/info.ts:33:16)
  Object.buildInfo (src/info.ts:20:12)
  Proxy.<anonymous> (src/handler.ts:26:14)
  util.js:655:12

@marktani
Copy link

marktani commented Apr 1, 2018

For what it's worth, prisma-binding works. Maybe that helps to spot the mistake?

@abhiaiyer91
Copy link
Collaborator Author

Looks like this is related? nodejs/node#10731

@abhiaiyer91
Copy link
Collaborator Author

Yeah so this isnt actually an error! only occurs when we console.log the binding it self! util overrides console.log! Interesting bug to say the least!

@abhiaiyer91
Copy link
Collaborator Author

http://www.mattzeunert.com/2016/07/20/proxy-symbol-tostring.html More info here if youre interested!

@schickling
Copy link
Contributor

Hmm interesting @abhiaiyer91! Can you provide a minimal example + instructions to reproduce this problem? Are there multiple issues for you or is all of it blocked by nodejs/node#10731?

@abhiaiyer91
Copy link
Collaborator Author

the most minimal example to repro is:

const binding = new Binding({ schema });
console.log(binding);

@abhiaiyer91
Copy link
Collaborator Author

Im not blocked at all, we can just close this issue

@schickling schickling changed the title Instantiating a new binding throws errors. console.log(binding) throws error [depends on nodejs/node#10731] Apr 2, 2018
@schickling
Copy link
Contributor

We'll keep this issue open until nodejs/node#10731 is resolved.

As of the other issue: I've created an issue over here: graphql-binding/graphql-binding-github#118

@Urigo
Copy link
Collaborator

Urigo commented May 26, 2020

Thank you for reporting.

In the last few months, since the transition of many libraries under The Guild's leadership, We've reviewed and released many improvements and versions to graphql-cli, graphql-config and graphql-import.

We've reviewed graphql-binding, had many meetings with current users and engaged the community also through the roadmap issue.

What we've found is that the new GraphQL Mesh library is covering not only all the current capabilities of GraphQL Binding, but also the future ideas that were introduced in the original GraphQL Binding blog post and haven't come to life yet.

And the best thing - GraphQL Mesh gives you all those capabilities, even if your source is not a GraphQL service at all!
it can be GraphQL, OpenAPI/Swagger, gRPC, SQL or any other source!
And of course you can even merge all those sources into a single SDK.

Just like GraphQL Binding, you get a fully typed SDK (thanks to the protocols SDKs and the GraphQL Code Generator), but from any source, and that SDK can run anywhere, as a connector or as a full blown gateway.
And you can share your own "Mesh Modules" (which you would probably call "your own binding") and our community already created many of those!
Also, we decided to simply expose regular GraphQL, so you can choose how to consume it using all the awesome fluent client SDKs out there.

If you think that we've missed anything from GraphQL Binding that is not supported in a better way in GraphQL Mesh, please let us know!


In the context of that particular issue - GraphQL Mesh uses much newer version of Node so I believe this should be covered.

We're looking forward for your feedback of how we can make your experience even better!

@Urigo Urigo closed this as completed May 26, 2020
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

5 participants