def fragment_on_non_composite_error(frag_name, type_name, line, column): return { 'message': FragmentsOnCompositeTypes.fragment_on_non_composite_error_message( frag_name, type_name), 'locations': [SourceLocation(line, column)] }
def test_scalar_is_invalid_inline_fragment_type(): expect_fails_rule(FragmentsOnCompositeTypes, ''' fragment invalidFragment on Pet { ... on String { barks } } ''', [{ 'message': FragmentsOnCompositeTypes.inline_message('String'), 'locations': [SourceLocation(3, 16)] }])
def test_scalar_is_invalid_inline_fragment_type(): expect_fails_rule( FragmentsOnCompositeTypes, ''' fragment invalidFragment on Pet { ... on String { barks } } ''', [{ 'message': FragmentsOnCompositeTypes.inline_message('String'), 'locations': [SourceLocation(3, 16)] }])
def fragment_on_non_composite_error(frag_name, type_name, line, column): return { 'message': FragmentsOnCompositeTypes.fragment_on_non_composite_error_message(frag_name, type_name), 'locations': [SourceLocation(line, column)] }