Created
January 6, 2020 02:41
-
-
Save ryo0301/788e865c94db113b7c7786e8dacd93f6 to your computer and use it in GitHub Desktop.
aws appsync graphql transfer @auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Building | |
@auth( | |
rules: [ | |
{ | |
allow: groups, | |
groups: ["Managers"], | |
queries: null, | |
mutations: [create, update, delete] | |
}, | |
{ | |
allow: groups, | |
groups: ["Users"], | |
queries: [get, list], | |
mutations: null | |
} | |
] | |
) | |
{ | |
id: ID! | |
name: String! | |
address: String! | |
units: [Unit!]! | |
} | |
type Unit | |
@auth( | |
rules: [ | |
{ | |
allow: groups, | |
groups: ["Managers"], | |
queries: null, | |
mutations: [create, update, delete] | |
}, | |
{ | |
allow: groups, | |
groups: ["Users"], | |
queries: [get, list], | |
mutations: null | |
} | |
] | |
) | |
{ | |
buildingid: ID! | |
unitid: String! | |
name: String! | |
building: Building! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment