Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
test(schema-plugin): add a test case for Object directives
Browse files Browse the repository at this point in the history
  • Loading branch information
machi1990 committed Aug 3, 2020
1 parent a3ee445 commit c8f5696
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ type TestResultList {
`;

exports[`Test snapshot config gql 1`] = `
"directive @test(description: String) on FIELD_DEFINITION | ENUM_VALUE
"directive @test(description: String) on FIELD_DEFINITION | ENUM_VALUE | OBJECT
\\"\\"\\"Exposes a URL that specifies the behaviour of this scalar.\\"\\"\\"
directive @specifiedBy(
Expand Down Expand Up @@ -251,7 +251,7 @@ input CreateTestInput {
metadata: GraphbackJSON
}
type CustomType {
type CustomType @test(description: \\"Directive added following a fix for https://github.com/aerogear/graphback/issues/1767\\") {
issue1432: String
}
Expand Down Expand Up @@ -400,7 +400,7 @@ type Mutation {
}
\\"\\"\\" @model \\"\\"\\"
type Note {
type Note @test(description: \\" Directive added following a fix for https://github.com/aerogear/graphback/issues/1767\\") {
id: ID!
title: String! @test(description: \\"mock directive\\")
description: String!
Expand Down Expand Up @@ -514,7 +514,7 @@ input TestSubscriptionFilter {
`;

exports[`Test snapshot config js 1`] = `
"directive @test(description: String) on FIELD_DEFINITION | ENUM_VALUE
"directive @test(description: String) on FIELD_DEFINITION | ENUM_VALUE | OBJECT
type Query {
getLikedNotes(id: ID!, names: [String]!): Note!
Expand Down Expand Up @@ -853,7 +853,7 @@ input CommentSubscriptionFilter {
`;

exports[`Test snapshot config ts 1`] = `
"directive @test(description: String) on FIELD_DEFINITION | ENUM_VALUE
"directive @test(description: String) on FIELD_DEFINITION | ENUM_VALUE | OBJECT
type Query {
getLikedNotes(id: ID!, names: [String]!): Note!
Expand Down
6 changes: 3 additions & 3 deletions packages/graphback-codegen-schema/tests/mock.graphql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
directive @test(description: String) on FIELD_DEFINITION | ENUM_VALUE
directive @test(description: String) on FIELD_DEFINITION | ENUM_VALUE | OBJECT

""" @model """
type Note {
type Note @test(description: " Directive added following a fix for https://github.com/aerogear/graphback/issues/1767") {
id: ID!
title: String! @test(description: "mock directive")
description: String!
Expand Down Expand Up @@ -73,7 +73,7 @@ enum IssueCategory {
FEATURE_REQUEST
}

type CustomType {
type CustomType @test(description: "Directive added following a fix for https://github.com/aerogear/graphback/issues/1767") {
issue1432: String
}

Expand Down

0 comments on commit c8f5696

Please sign in to comment.