Skip to content

Problem when using multiple authorisation annotations with implements keyword #262

Open
@HannaSanford

Description

@HannaSanford

I have a schema with interface types which uses the AppSync multiple authorisation method annotations on some types, mutations, and queries.

For example:

type ReadingTask implements Task @aws_cognito_user_pools @aws_iam {
    id: ID!
    patientId: ID!
    organisationId: ID
    readingId: ID
    reminders: [String]
    status: TaskStatus!
    subtitle: String
    time: String!
    timeAndId: String!
    title: String!
    vital: VitalType!
}

when this schema is deployed by the serverless plugin, these types come through with the annotations before the implementation. i.e.

type ReadingTask @aws_cognito_user_pools @aws_iam implements Task {
    id: ID!
    patientId: ID!
    organisationId: ID
    readingId: ID
    reminders: [String]
    status: TaskStatus!
    subtitle: String
    time: String!
    timeAndId: String!
    title: String!
    vital: VitalType!
}

This is flagging up as an invalid schema and breaking the related queries and mutations.
Currently, I am having to manually change these in the AppSync console and re-add the related resolvers.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions