-
-
Notifications
You must be signed in to change notification settings - Fork 798
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 improved mapSchema to make schema package functions not modify existing schema #1456
Merged
Commits on May 8, 2020
-
= add enhanceSchema function that can add/replace types/directives, see detailed comment with regard to motivation even for simply adding a new type (vs just using toConfig) = simplify field helper functions more complex modifyFields function is not necessary, empty types can be added and later extended so if multiples types with cross-referencing fields need to be added, the types can be added first without fields, and the fields appended later. = appendFields currently adds fields to a new type if no existing type is found, this functionality perhaps should be made configurable or put in a separate function
Configuration menu - View commit details
-
Copy full SHA for 4cabc55 - Browse repository at this point
Copy the full SHA 4cabc55View commit details
Commits on May 10, 2020
-
convert default values as leaf values internal values may change when…
… mapping this is necessary to eventually replace use of healSchema and forEachDefaultValue within AddResolversToSchema, although use of mapSchema will require that function to be immutable
Configuration menu - View commit details
-
Copy full SHA for dd4713e - Browse repository at this point
Copy the full SHA dd4713eView commit details -
Configuration menu - View commit details
-
Copy full SHA for cc4a0e5 - Browse repository at this point
Copy the full SHA cc4a0e5View commit details -
= appendObjectFields and removeObjectFields better describe that these functions only apply to fields of GraphQLObjectType = enhanceSchema is a bit vague
Configuration menu - View commit details
-
Copy full SHA for d2eea3c - Browse repository at this point
Copy the full SHA d2eea3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 55f4742 - Browse repository at this point
Copy the full SHA 55f4742View commit details
Commits on May 11, 2020
-
continue mutable => immutable conversion
This change: = bring default value updating into mapSchema = change aaddResolversToSchema, addCatchUndefinedToSchema, addErrorLoggingToSchema, addSchemaLevelResolver to all use mapSchema to return a new schema without modifying the passed in schema = change all internal use of these functions and all tests to use the return value = pass typeName instead of a type to field mappers, as passing a type can be confusing, because the type may be in the process of being mapped and not equivalent to the type in the original schema ** the visitSchema function and the schema directive classes that use visitSchema are the next (final?) target for mutable => immutable conversion
Configuration menu - View commit details
-
Copy full SHA for bc5e111 - Browse repository at this point
Copy the full SHA bc5e111View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f4654c - Browse repository at this point
Copy the full SHA 0f4654cView commit details -
prune unnecessary field mapper types
there are only really two types of fields, "composite fields" or "output fields" called "fields" in graphql-js on object and interfaces, and input fields on input objects. The generic FieldMapper type is useful for internal function mapFields so that field mapping logic does not have to be duplicated between output and input fields because of the different types.
Configuration menu - View commit details
-
Copy full SHA for 49de733 - Browse repository at this point
Copy the full SHA 49de733View 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.