Current implementation of custom directives and scalars always outputs a definition for the directive/scalar with the developer having no control over it. for e.g. defining aws_lambda directive for certain fields which is a inherently defined / supported directive by AWS App Sync but not by the GraphQL standard will output the directive definition which AWS does not like 🥲, making this library in all it's glory very hard to use with AppSync.
An example of the current output:
directive @aws_lambda on OBJECT
scalar AWSTimestamp
type Query {
ok: Boolean!
}
type Random @aws_lambda {
expiry: AWSTimestamp
}
What AWS AppSync would like the output to be:
type Query {
ok: Boolean!
}
type Random @aws_lambda {
expiry: AWSTimestamp
}
Fix
To work around the issue and to give more control to the developer I added another optional field to the makeSchema method called filters, which allows the developer to define custom filters for the directives and types which gives them the ability to exclude them from the definition if needed.
Problem Statement
Current implementation of custom directives and scalars always outputs a definition for the directive/scalar with the developer having no control over it. for e.g. defining
aws_lambda
directive for certain fields which is a inherently defined / supported directive by AWS App Sync but not by the GraphQL standard will output the directive definition which AWS does not like 🥲, making this library in all it's glory very hard to use with AppSync.An example of the current output:
What AWS AppSync would like the output to be:
Fix
To work around the issue and to give more control to the developer I added another optional field to the
makeSchema
method called filters, which allows the developer to define custom filters for the directives and types which gives them the ability to exclude them from the definition if needed.