Conversation
|
Hi @bbuck Thanks for the PR, really appreciate the effort you contributed to the project. Currently I have reservations about introducing a new type to I think currently #101 fits the use case for a user-defined Scalar type. This means that the user can create a new Scalar type named Pointer through existing API If anyone need a complete example of how to implement a custom scalar type using Thanks again! Edit: I'm not sure if you have already tried the |
|
This was superseded by #199 This was done without introducing a new point, but accepting pointers or scalars and coercing them correctly. |
|
This issue needs to be closed, you are correct. The intent here was to do this explicitly, instructing those viewing your Schema that a pointer is expected to be returned. I'm not opposed to the solution presented in #199 though, as I just wanted the problem to be resolved! |
This adds a new meta-type,
Pointerto support pointer fields in structs. This allows easily converting a pattern like:To simply:
I realize that there is no spec for pointers but pointers aren't part of every language. I think it's important that we allow support for this due to significant amounts of boilerplate for simple pointer fields. I don't think there is really a better way to represent this outside of creating this new type, but I feel like it's an elegant solution.
This PR would close #101