diff --git a/config-example.yml b/config-example.yml index e20ea42f..39330bb8 100644 --- a/config-example.yml +++ b/config-example.yml @@ -85,7 +85,7 @@ introspection: spectaqlDirective: # Boolean indicating whether to enable and process the @spectaql directive # - # Eefault: true + # Default: true enable: true # String indicating the name to use for the SpectaQL directive diff --git a/examples/config.yml b/examples/config.yml index d94928ca..98ac52de 100644 --- a/examples/config.yml +++ b/examples/config.yml @@ -13,8 +13,6 @@ introspection: spectaqlDirective: enable: true - # directiveName: 'spectaqlll' - # optionsTypeName: 'SpectaQLOption' extensions: graphqlScalarExamples: true diff --git a/examples/data/schema.gql b/examples/data/schema.gql index a5258595..24b71d1a 100644 --- a/examples/data/schema.gql +++ b/examples/data/schema.gql @@ -64,6 +64,9 @@ type MyType implements MyInterface { requiredArrayField: [String]! doubleRequiredArrayField: [String!]! + + "This field will not show up thanks to the @spectaql directive options" + fieldThatWillNotShowUp: String! @spectaql(options: [{key: "undocumented", value: "true" }]) } "This is a type that should probably be undocumented. Metadata will indicate this should be hidden" diff --git a/package.json b/package.json index 6159b49d..6c6fd14b 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "pub:dry-run": "yarn prepare && npm publish --dry-run", "test": "mocha --config ./test/mocha-config.js", "test:watch": "nodemon -x 'yarn clean-build && yarn test'", - "develop": "nodemon -x 'yarn clean-build && node --inspect=0.0.0.0:9223 bin/spectaql' -D", + "develop": "nodemon -x 'yarn clean-build && node bin/spectaql' -D", "build:site": "node bin/spectaql", "build:example": "yarn build:site --target-dir ./examples/output ./examples/config.yml", "prettify": "prettier 'src/**/*.js' 'bin/**/*.js' 'test/**/*.js'", diff --git a/src/spectaql/directive.js b/src/spectaql/directive.js index 646f8449..2ddb35f8 100644 --- a/src/spectaql/directive.js +++ b/src/spectaql/directive.js @@ -25,7 +25,6 @@ const OPTION_TO_CONVERTER_FN = { documented: (val) => val === true || val === 'true', example: (val) => JSON.parse(val), examples: (vals) => JSON.parse(vals), - info: (val) => val, } export function generateSpectaqlSdl({ diff --git a/src/spectaql/index.js b/src/spectaql/index.js index 85c4bc80..6ea68c12 100644 --- a/src/spectaql/index.js +++ b/src/spectaql/index.js @@ -53,8 +53,6 @@ function run(opts) { const { introspectionResponse, graphQLSchema } = buildSchemas(opts) - // console.log(JSON.stringify(introspectionResponse)) - // Figure out what data arranger to use...the default one, or the one from the theme const customDataArrangerExists = ['data/index.js', 'data.js'].some( (pathSuffix) => {