-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Add hook for GraphQLScalarType #757
Comments
Love bullet 1 🙌 |
Incidentally if you fancied having a pop at this yourself; you basically need code like this: graphile-engine/packages/graphile-build/src/makeNewBuild.js Lines 796 to 806 in 6692c2a
Search through that file (and the (It's a bit more effort than I make it sound.) |
V5 does indeed have a |
Feature description
There is no hook for
GraphQLScalarType
. We should add one!Motivating example
I wanted to hook into the creation of the scalar types in
pgTypes
plugin. In particular, I wanted to renameDate
toIsoDate
(ok, there's an inflection for that), update the description (would've been possible by hooking intowrapDescription
, but it's not really meant for that), and update the parsing methods to validate a strictYYYY-MM-DD
format not everything that Postgres allows.I got a workaround that overwrites
build.graphql.GraphQLScalarType
beforepgTypesPlugin
uses it, but it's really ugly.Supporting development
The text was updated successfully, but these errors were encountered: