-
-
Notifications
You must be signed in to change notification settings - Fork 816
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
Use field configs #1451
Merged
Merged
Use field configs #1451
Commits on May 6, 2020
-
remove spurious uses of fieldToFieldConfig
If type.toConfig() is later called returning config, fieldToFieldConfig is called every field to populate config.fields, so no need to call it individually from the field map, might as well just move the toConfig call earlier.
Configuration menu - View commit details
-
Copy full SHA for b492e79 - Browse repository at this point
Copy the full SHA b492e79View commit details -
remove need for fieldToFieldConfig function
BREAKING CHANGE: transformer functions will be passed field config objects instead of field objects. fieldToFieldConfig was necessary because TransformRootField et al functions expected users to pass a function that receives a field and returns a field config, modified as desired. This can be made easier for end users by simply passing the transformer function a field config instead of a field, obviating the need for fieldToFieldConfig.
Configuration menu - View commit details
-
Copy full SHA for 78d3702 - Browse repository at this point
Copy the full SHA 78d3702View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc0cc2f - Browse repository at this point
Copy the full SHA fc0cc2fView commit details
Commits on May 7, 2020
-
hoist schema transformation out of type/field loop
this should be performed only once!
Configuration menu - View commit details
-
Copy full SHA for 5c42528 - Browse repository at this point
Copy the full SHA 5c42528View commit details -
don't mutate previous schemas with HoistField and WrapFields transforms
fields helper functions now take a schema and return a new schema, rather than mutating the original schema's typemap. part of broader push throughout the code base to avoid mutating schemas Note: specifically within the context of transforms, we are currently protected against any side effects when mutating the passed in schema in any case. cloneSchema is used during the transformation loop -- the original schema cannot be mutated by a transformation, because a clone is passed rather than the original. Nevertheless, these changes are part of the overall effort to never rely on the ability to mutate an existing graphql schema.
Configuration menu - View commit details
-
Copy full SHA for bbd1c9d - Browse repository at this point
Copy the full SHA bbd1c9dView commit details -
and add comment to explain how this works
Configuration menu - View commit details
-
Copy full SHA for 4fba6f9 - Browse repository at this point
Copy the full SHA 4fba6f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for e48f2b2 - Browse repository at this point
Copy the full SHA e48f2b2View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.