GraphQL: Print directives for field declarations (#2317)

master
Christopher Chedeau 2017-06-27 20:22:03 -07:00 committed by GitHub
parent 45c8e40d8a
commit b231948a36
3 changed files with 16 additions and 1 deletions

View File

@ -254,7 +254,8 @@ function genericPrint(path, options, print) {
)
: "",
": ",
path.call(print, "type")
path.call(print, "type"),
printDirectives(path, print, n)
]);
}

View File

@ -11,6 +11,17 @@ type Video {
`;
exports[`directives.graphql 1`] = `
type PokemonType {
pokemon_type: String @mock(value: "Electric")
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
type PokemonType {
pokemon_type: String @mock(value: "Electric")
}
`;
exports[`extend.graphql 1`] = `
extend type Feedback {
custom_int: Int

View File

@ -0,0 +1,3 @@
type PokemonType {
pokemon_type: String @mock(value: "Electric")
}