1.0.0 • Published 2 years ago

graphql-default-owner-transformer v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@owner directive

Code Style: Google

This @owner directive on the GraphQL schema for the AWS Amplify API framework will force the field to take the IAM user's username.

Whilst the existing framework does some automatic owner addition for you, I have found it to be buggy and not always work. This is like forcing a field to take the owner's username.

Install

coming soon

Dev

yarn install

How to use

type Post @model {
  id: ID!
  message: String
  owner: String @owner
}

Limitations and TODOs:

  • Only works with IAM credentials and takes the username.
  • Does not check if the credentials exist, it only assumes.