Closed
Description
Summary
I want to be able to comment on a table with any type of custom directive @pii
and have that show up on the schema generation side.
I've tried multiple different approaches with a plugin, the closest I've gotten is to creating a directive in the schema, but I don't need that to happen as I stitch the schema into a larger one that has the directive defined. Really I just need to be able to tell the schema to take the comment of @pii
and output it to the schema
function PIITag(builder: any) {
builder.hook("GraphQLSchema", (schemaConfig: any, build: Build) => {
return {
...schemaConfig,
directives: [
...(schemaConfig.directives || []),
build.newWithHooks(build.graphql.GraphQLDirective,
{ name: 'notPii', locations: ['FIELD_DEFINITION', 'OBJECT'], args: {} },
{ name: 'pii', locations: ['FIELD_DEFINITION', 'OBJECT'], args: {} }
)
],
}
});
}
This doesn't lead to the desired output.
Desired output:
comment on function health_check() is E'@notPii true';
type Query {
"""
Exposes the root query type nested one level down. This is helpful for Relay 1
which can only query top level fields if they are in a particular form.
"""
query: Query!
healthCheck: Boolean @notPii
}
any help here would be appreciated
Metadata
Metadata
Assignees
Labels
No labels