func TestValidate_FieldsOnCorrectType_AliasedInterfaceFieldSelection(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.FieldsOnCorrectTypeRule, `
      fragment interfaceFieldSelection on Pet {
        otherName : name
      }
    `)
}
func TestValidate_KnownArgumentNames_DirectiveArgsAreKnown(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.KnownArgumentNamesRule, `
      {
        dog @skip(if: true)
      }
    `)
}
func TestValidate_AnonymousOperationMustBeAlone_OneAnonOperation(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.LoneAnonymousOperationRule, `
      {
        field
      }
    `)
}
func TestValidate_KnownArgumentNames_SingleArgIsKnown(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.KnownArgumentNamesRule, `
      fragment argOnRequiredArg on Dog {
        doesKnowCommand(dogCommand: SIT)
      }
    `)
}
func TestValidate_KnownArgumentNames_MultipleArgsInReverseOrderAreKnown(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.KnownArgumentNamesRule, `
      fragment multipleArgsReverseOrder on ComplicatedArgs {
        multipleReqs(req2: 2, req1: 1)
      }
    `)
}
func TestValidate_UniqueArgumentNames_SameArgumentOnTwoDirectives(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.UniqueArgumentNamesRule, `
      {
        field @directive1(arg: "value") @directive2(arg: "value")
      }
    `)
}
func TestValidate_NoCircularFragmentSpreads_SpreadingTwiceIndirectlyIsNotCircular(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.NoFragmentCyclesRule, `
      fragment fragA on Dog { ...fragB, ...fragC }
      fragment fragB on Dog { ...fragC }
      fragment fragC on Dog { name }
    `)
}
func TestValidate_FragmentsOnCompositeTypes_InterfaceIsValidFragmentType(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.FragmentsOnCompositeTypesRule, `
      fragment validFragment on Pet {
        name
      }
    `)
}
func TestValidate_FragmentsOnCompositeTypes_UnionIsValidFragmentType(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.FragmentsOnCompositeTypesRule, `
      fragment validFragment on CatOrDog {
        __typename
      }
    `)
}
func TestValidate_UniqueFragmentNames_NoFragments(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.UniqueFragmentNamesRule, `
      {
        field
      }
    `)
}
func TestValidate_FragmentsOnCompositeTypes_ObjectIsValidFragmentType(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.FragmentsOnCompositeTypesRule, `
      fragment validFragment on Dog {
        barks
      }
    `)
}
func TestValidate_KnownFragmentNames_KnownFragmentNamesAreValid(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.KnownFragmentNamesRule, `
      {
        human(id: 4) {
          ...HumanFields1
          ... on Human {
            ...HumanFields2
          }
          ... {
            name
          }
        }
      }
      fragment HumanFields1 on Human {
        name
        ...HumanFields3
      }
      fragment HumanFields2 on Human {
        name
      }
      fragment HumanFields3 on Human {
        name
      }
    `)
}
func TestValidate_FieldsOnCorrectType_IgnoresFieldsOnUnknownType(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.FieldsOnCorrectTypeRule, `
      fragment unknownSelection on UnknownType {
        unknownField
      }
    `)
}
func TestValidate_FieldsOnCorrectType_LyingAliasSelection(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.FieldsOnCorrectTypeRule, `
      fragment lyingAliasSelection on Dog {
        name : nickname
      }
    `)
}
func TestValidate_UniqueArgumentNames_NoArgumentsOnDirective(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.UniqueArgumentNamesRule, `
      {
        field @directive
      }
    `)
}
func TestValidate_UniqueInputFieldNames_InputObjectWithFields(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.UniqueInputFieldNamesRule, `
      {
        field(arg: { f: true })
      }
    `)
}
func TestValidate_UniqueArgumentNames_ArgumentOnField(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.UniqueArgumentNamesRule, `
      {
        field(arg: "value")
      }
    `)
}
func TestValidate_UniqueInputFieldNames_SameInputObjectWithinTwoArgs(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.UniqueInputFieldNamesRule, `
      {
        field(arg1: { f: true }, arg2: { f: true })
      }
    `)
}
func TestValidate_UniqueArgumentNames_MultipleDirectiveArguments(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.UniqueArgumentNamesRule, `
      {
        field @directive(arg1: "value", arg2: "value", arg3: "value")
      }
    `)
}
func TestValidate_UniqueInputFieldNames_MultipleInputObjectFields(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.UniqueInputFieldNamesRule, `
      {
        field(arg: { f1: "value", f2: "value", f3: "value" })
      }
    `)
}
func TestValidate_NoCircularFragmentSpreads_DoesNotFalsePositiveOnUnknownFragment(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.NoFragmentCyclesRule, `
      fragment nameFragment on Pet {
        ...UnknownFragment
      }
    `)
}
func TestValidate_VariableDefaultValuesOfCorrectType_VariablesWithNoDefaultValues(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.DefaultValuesOfCorrectTypeRule, `
      query NullableValues($a: Int, $b: String, $c: ComplexInput) {
        dog { name }
      }
    `)
}
func TestValidate_KnownArgumentNames_IgnoresArgsOfUnknownFields(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.KnownArgumentNamesRule, `
      fragment argOnUnknownField on Dog {
        unknownField(unknownArg: SIT)
      }
    `)
}
func TestValidate_VariableDefaultValuesOfCorrectType_RequiredVariablesWithoutDefaultValues(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.DefaultValuesOfCorrectTypeRule, `
      query RequiredValues($a: Int!, $b: String!) {
        dog { name }
      }
    `)
}
func TestValidate_KnownArgumentNames_NoArgsOnOptionalArg(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.KnownArgumentNamesRule, `
      fragment noArgOnOptionalArg on Dog {
        isHousetrained
      }
    `)
}
func TestValidate_UniqueOperationNames_NoOperations(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.UniqueOperationNamesRule, `
      fragment fragA on Type {
        field
      }
    `)
}
func TestValidate_AnonymousOperationMustBeAlone_NoOperations(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.LoneAnonymousOperationRule, `
      fragment fragA on Type {
        field
      }
    `)
}
func TestValidate_UniqueOperationNames_OneNamedOperation(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.UniqueOperationNamesRule, `
      query Foo {
        field
      }
    `)
}
func TestValidate_VariablesAreInputTypes_(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.VariablesAreInputTypesRule, `
      query Foo($a: String, $b: [Boolean!]!, $c: ComplexInput) {
        field(a: $a, b: $b, c: $c)
      }
    `)
}
func TestValidate_FieldsOnCorrectType_MetaFieldSelectionOnUnion(t *testing.T) {
	testutil.ExpectPassesRule(t, graphql.FieldsOnCorrectTypeRule, `
      fragment directFieldSelectionOnUnion on CatOrDog {
        __typename
      }
    `)
}