graphql-default-owner-transformer
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@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.

Package Sidebar

Install

npm i graphql-default-owner-transformer

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

264 kB

Total Files

24

Last publish

Collaborators

  • sirvan3tr