aws-appsync

AWS Appsync implementation using GraphQL-client library in .Net

一个人想着一个人 提交于 2021-01-27 19:43:33
问题 I am trying to implement an app sync subscription similar to this python example but in .net https://aws.amazon.com/blogs/mobile/appsync-websockets-python/ I started this using the nuget package GraphQL.Client https://www.nuget.org/packages/GraphQL.Client The execution of Query/Mutation is working fine like given in the readme of https://github.com/graphql-dotnet/graphql-client But subscription is not working. My code using the GraphQL.Client: using var graphQLClient = new GraphQLHttpClient(

AWS Appsync implementation using GraphQL-client library in .Net

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-27 19:20:29
问题 I am trying to implement an app sync subscription similar to this python example but in .net https://aws.amazon.com/blogs/mobile/appsync-websockets-python/ I started this using the nuget package GraphQL.Client https://www.nuget.org/packages/GraphQL.Client The execution of Query/Mutation is working fine like given in the readme of https://github.com/graphql-dotnet/graphql-client But subscription is not working. My code using the GraphQL.Client: using var graphQLClient = new GraphQLHttpClient(

AWS Amplify - AppSync & Multiple DynamoDB Tables

核能气质少年 提交于 2020-12-28 15:06:55
问题 When initializing a new GraphQL backend via the Amplify CLI, the sample schema defines multiple types with the @model annotation. For example... type Blog @model { id: ID! name: String! posts: [Post] @connection(name: "BlogPosts") } type Post @model { id: ID! title: String! blog: Blog @connection(name: "BlogPosts") comments: [Comment] @connection(name: "PostComments") } type Comment @model { id: ID! content: String post: Post @connection(name: "PostComments") } When pushed, this results in

AWS Amplify - AppSync & Multiple DynamoDB Tables

和自甴很熟 提交于 2020-12-28 15:03:38
问题 When initializing a new GraphQL backend via the Amplify CLI, the sample schema defines multiple types with the @model annotation. For example... type Blog @model { id: ID! name: String! posts: [Post] @connection(name: "BlogPosts") } type Post @model { id: ID! title: String! blog: Blog @connection(name: "BlogPosts") comments: [Comment] @connection(name: "PostComments") } type Comment @model { id: ID! content: String post: Post @connection(name: "PostComments") } When pushed, this results in

AWS Amplify - AppSync & Multiple DynamoDB Tables

戏子无情 提交于 2020-12-28 15:02:32
问题 When initializing a new GraphQL backend via the Amplify CLI, the sample schema defines multiple types with the @model annotation. For example... type Blog @model { id: ID! name: String! posts: [Post] @connection(name: "BlogPosts") } type Post @model { id: ID! title: String! blog: Blog @connection(name: "BlogPosts") comments: [Comment] @connection(name: "PostComments") } type Comment @model { id: ID! content: String post: Post @connection(name: "PostComments") } When pushed, this results in

How to do field level @auth for bi-directional one-to-many @connection with AppSync GraphQL Transform?

て烟熏妆下的殇ゞ 提交于 2020-12-12 04:41:43
问题 I'm trying to figure out how can you protect at field level a one-to-many @connection with @auth against mutations that shouldn't be allowed. (ie: deny a specific user to run a mutation that will end-up inserting posts as another user.) Starting with the example for protecting a mutation at the field level: https://aws-amplify.github.io/docs/cli/graphql#field-level-authorization I tried doing something like this: type User @model @auth(rules: [{ allow: owner, ownerField: "id" }]) { id: ID!

How to do field level @auth for bi-directional one-to-many @connection with AppSync GraphQL Transform?

只谈情不闲聊 提交于 2020-12-12 04:41:34
问题 I'm trying to figure out how can you protect at field level a one-to-many @connection with @auth against mutations that shouldn't be allowed. (ie: deny a specific user to run a mutation that will end-up inserting posts as another user.) Starting with the example for protecting a mutation at the field level: https://aws-amplify.github.io/docs/cli/graphql#field-level-authorization I tried doing something like this: type User @model @auth(rules: [{ allow: owner, ownerField: "id" }]) { id: ID!

How to properly handle unauthenticated users and requests in AWS Amplify/AppSync React apps?

和自甴很熟 提交于 2020-12-01 13:24:38
问题 I am having a very hard time to figure out how to handle unauthenticated users in a React app which uses AWS Amplify and AWS AppSync. Seems like most docs suggest to wrap the whole app with withAuthenticator HOC from aws-amplify-react but in the real world it is a very rare case. So here how I am setting a client to talk to the AppSync API const client = new AWSAppSyncClient({ url: AppSyncConfig.aws_appsync_graphqlEndpoint, region: AppSyncConfig.aws_appsync_region, auth: { type: AUTH_TYPE

How to properly handle unauthenticated users and requests in AWS Amplify/AppSync React apps?

六眼飞鱼酱① 提交于 2020-12-01 13:24:03
问题 I am having a very hard time to figure out how to handle unauthenticated users in a React app which uses AWS Amplify and AWS AppSync. Seems like most docs suggest to wrap the whole app with withAuthenticator HOC from aws-amplify-react but in the real world it is a very rare case. So here how I am setting a client to talk to the AppSync API const client = new AWSAppSyncClient({ url: AppSyncConfig.aws_appsync_graphqlEndpoint, region: AppSyncConfig.aws_appsync_region, auth: { type: AUTH_TYPE