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

Improve type checks on variables #1141

Merged

Commits on Jan 5, 2022

  1. Add TypeReference.name/1 to get graphql representation

    Necessary to get the name of the type when
    the underlying type may not exist in the schema
    and therefore `Absinthe.Type.name/1` won't work.
    maartenvanvliet committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    1e104ee View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2022

  1. Match spec on allowed variable usage

    spec: https://spec.graphql.org/October2021/#sec-All-Variable-Usages-are-Allowed
    
    fixes absinthe-graphql#1134
    
    Several cases did not return errors
     * when the location type was non nullable and the variable nullable
     * when the location type was a list and the variable wasn't
    
    Some cases are allowed:
      * contravariant, when the location type is nullable and the variable
        non-nullable
      * the the argument is non-nullable but either the variable or argument
        has a default value
    maartenvanvliet committed Jan 6, 2022
    Configuration menu
    Copy the full SHA
    98e7a6c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fb95a1f View commit details
    Browse the repository at this point in the history
  3. Remove obsolete directive tests

    With the changes on allowed variable usage they would only test
    whether the directive variable in the operation was present. This
    is covered elsewhere.
    maartenvanvliet committed Jan 6, 2022
    Configuration menu
    Copy the full SHA
    01307d9 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2022

  1. Configuration menu
    Copy the full SHA
    98f5d98 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5024df7 View commit details
    Browse the repository at this point in the history