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

If requested, validate binding-types get the right fields #70

Merged
merged 1 commit into from
Aug 30, 2021

Commits on Aug 28, 2021

  1. If requested, validate binding-types get the right fields

    One sharp edge of the new `bindings` setting (when used for composite
    types) is this: the (presumably struct) type to which you're binding
    may expect to have particular fields, but it's GraphQL so you could have
    requested some other set of fields.  Now, if you ask us, we check.
    
    Specifically, I've added a new setting under the `bindings` items, which
    says: everywhere we query this must select these fields.  (Or use its
    own inline `# @genqlient(bind: ...)`.)  It must select exactly those
    fields, in order, no more, no less.  This was fairly easy to implement;
    actually comparing the selections was surprisingly much code but it's
    all pretty straightforward.
    
    Test plan: make check
    
    Reviewers: csilvers, marksandstrom, miguel, adam
    benjaminjkraft committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    9e297a0 View commit details
    Browse the repository at this point in the history