Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

282
Vistas
AWS AppSync - Defining GraphQL schema with custom directives

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?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

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.

over 4 years ago · Santiago Trujillo Denunciar

0

Interestingly, using the AWS CDK, a Directive.custom method is available at both the field and object level e.g.

import { Field, GraphqlType, InterfaceType, ObjectType, Directive } from '@aws-cdk/aws-appsync-alpha';

new ObjectType('MyObjectType', {
    definition: {
        id: GraphqlType.id({ isRequired: true }),
        name: new Field({ returnType: GraphqlType.string(), directives: [Directive.custom('@myCustomFieldDirective(param: "value")')] })
    },
    directives: [
        Directive.custom('@myCustomObjectDirective(param: "value")')
    ]
});
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda