google / uuid

Go package for UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services.
BSD 3-Clause "New" or "Revised" License
5.26k stars 362 forks source link

implement graphql UnmarshalGQL/MarshalGQL funcs #52

Closed farwydi closed 1 year ago

farwydi commented 4 years ago

For easy integration with https://github.com/99designs/gqlgen

pborman commented 4 years ago

Sorry for the delay. I have a concern about adding every possible marshaling function to this package. While the code is not great in size, there are a number of other marshaling interface types as well. There have been other marshalers also requested. I am concerned about opening the flood gates and having a large number of these get added. It seems like the better idea would be for the gqlgen package to be able to use the MarshalText interface for types that do not directly implement MarshalGQL. This is how JSON marshals uuids without requiring the JSON specific methods.