-
-
Save armedoctopus/8dff73d0a89f2f0199ffb97122fbe0a8 to your computer and use it in GitHub Desktop.
Cities App Schema
This file contains hidden or 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 City { | |
| id: ID! | |
| name: String! | |
| country: String! | |
| locations: [Location] | |
| } | |
| type Location { | |
| id: ID! | |
| cityId: ID! | |
| name: String! | |
| info: String | |
| } | |
| type Mutation { | |
| putCity(id: ID!, name: String!, country: String!): City | |
| deleteCity(id: ID!): City | |
| putLocation( | |
| id: ID!, | |
| cityId: ID!, | |
| name: String!, | |
| info: String | |
| ): Location | |
| deleteLocation(id: ID!): Location | |
| } | |
| type Query { | |
| getCity(id: ID!): City | |
| allCity(count: Int, nextToken: String): [City] | |
| getLocation(id: ID!): Location | |
| allLocation(count: Int, nextToken: String): [Location] | |
| } | |
| type Subscription { | |
| putLocation: Location | |
| @aws_subscribe(mutations: ["putLocation"]) | |
| putCity: City | |
| @aws_subscribe(mutations: ["putCity"]) | |
| } | |
| schema { | |
| query: Query | |
| mutation: Mutation | |
| subscription: Subscription | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment