While defining this custom directive:
directive @hashField on INPUT_FIELD_DEFINITION
I get this error on the AWS AppSync (Schema tab):
Error parsing schema. Directive definitions are not supported.
I understand AWS provides functions that can provide similar functionalities, but these functions won't work for my use case.
What's the alternative for custom directives in AWS AppSync? Is it going to be supported in a future release?
A directive decorates part of a GraphQL schema or operation with additional configuration. Tools like Apollo Server (and Apollo Client) can read a GraphQL document's directives and perform custom logic as appropriate. Directives are preceded by the @ character, like so: GraphQL. schema.graphql.
AWS AppSync provides a robust, scalable GraphQL interface for application developers to combine data from multiple sources, including Amazon DynamoDB, AWS Lambda, and HTTP APIs.
AWSTimestamp. An integer value representing the number of seconds before or after 1970-01-01-T00:00Z . AWSEmail. An email address in the format local-part@domain-part as defined by RFC 822 .
Apparently it's not in their roadmap to add Directives support.
An alternative could be custom scalar types; however, it doesn't meet my requirements since I need to specify order of multiple directives applied to a particular field.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With