From 93e4a1386fa99f2e50491c080b946f79c07bb597 Mon Sep 17 00:00:00 2001 From: Hayato Yamauchi Date: Mon, 2 Nov 2020 22:19:56 +0900 Subject: [PATCH] syncExpression https://docs.amplify.aws/lib/datastore/sync/q/platform/js#selective-sync --- .graphqlconfig.yml | 3 + .../backend/api/amplifydsvue/schema.graphql | 1 + src/HelloWorld.vue | 18 +- src/graphql/mutations.js | 3 + src/graphql/queries.js | 3 + src/graphql/schema.json | 251 +++++++++++------- src/graphql/subscriptions.js | 3 + src/models/index.d.ts | 1 + src/models/schema.js | 9 +- 9 files changed, 189 insertions(+), 103 deletions(-) diff --git a/.graphqlconfig.yml b/.graphqlconfig.yml index 5c3ce02..18aaa43 100644 --- a/.graphqlconfig.yml +++ b/.graphqlconfig.yml @@ -10,3 +10,6 @@ projects: codeGenTarget: javascript generatedFileName: '' docsFilePath: src/graphql +extensions: + amplify: + version: 3 diff --git a/amplify/backend/api/amplifydsvue/schema.graphql b/amplify/backend/api/amplifydsvue/schema.graphql index 0646105..a617d70 100644 --- a/amplify/backend/api/amplifydsvue/schema.graphql +++ b/amplify/backend/api/amplifydsvue/schema.graphql @@ -1,6 +1,7 @@ type Chatty @model { id: ID! user: String! + rate: Int! message: String! createdAt: AWSDateTime } \ No newline at end of file diff --git a/src/HelloWorld.vue b/src/HelloWorld.vue index 2163a4d..03da2f2 100644 --- a/src/HelloWorld.vue +++ b/src/HelloWorld.vue @@ -1,12 +1,13 @@