Skip to content
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

enhance(stitching): increase key flexibility when type merging #1888

Merged
merged 12 commits into from
Aug 11, 2020

Commits on Aug 11, 2020

  1. Configuration menu
    Copy the full SHA
    8df12ca View commit details
    Browse the repository at this point in the history
  2. enhance(stitching): only add necessary keys

    also consolidates equivalent selections
    
    add memoization
    
    This could be optimized differently: if there was a mapping of fields within the gateway schema to the subschemas containing those fields, we could instead iterate through the document and collect the originating subschemas and then add the keys for each of those subschemas. This method seems possibly about as good.
    yaacovCR committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    b451ba8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6b44039 View commit details
    Browse the repository at this point in the history
  4. enhance(typeMerging): expand allowed keys

    allow keys whose source data is spread across multiple schemas
    yaacovCR committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    8a0321a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c6e58bf View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    183d279 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ded83e7 View commit details
    Browse the repository at this point in the history
  8. proof of concept?

    yaacovCR committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    993ffb5 View commit details
    Browse the repository at this point in the history
  9. fix

    yaacovCR committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    3ae3b7e View commit details
    Browse the repository at this point in the history
  10. enhance(typeMerging): prune fields that cause key fields to be added

    key fields for a given subschema by definition must be resolved outside that subschema, and so for any given key field, there is no need to add the other key fields to the selectionSet or to consider the key field as proxiable via that subschema.
    
    The key field is the "key" to the remaining fields, but -- for the purposes of type merging -- will never be obtained from the given subschema.
    
    This becomes more complex with non-leaf key fields, and so this pruning is enabled only for leaf key fields.
    yaacovCR committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    bad1e54 View commit details
    Browse the repository at this point in the history
  11. fix

    yaacovCR committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    0924da4 View commit details
    Browse the repository at this point in the history
  12. change example

    to favor input object type over scalar
    
    see #1888 (review)
    yaacovCR committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    bb50f3e View commit details
    Browse the repository at this point in the history