Skip to content

Instantly share code, notes, and snippets.

@dabit3
Forked from daryllukas/schema.graphql
Created August 20, 2020 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dabit3/a4d8d644884c852baa4aefcbf2e8337d to your computer and use it in GitHub Desktop.
Save dabit3/a4d8d644884c852baa4aefcbf2e8337d to your computer and use it in GitHub Desktop.
type Address
@model
@key(name: "byJob", fields: ["jobId", "addressLine1"])
@auth(
rules: [
{ allow: groups, groups: ["Admin"], queries: [get, list], mutations: [update, delete] }
{ allow: public, operations: [read], queries: [get, list], mutations: [create] }
{ allow: private, operations: [read], mutations: [create] }
]
) {
id: ID!
jobId: ID!
addressLine1: String!
addressLine2: String
createdAt: AWSDateTime
updatedAt: AWSDateTime
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment