appsync-apollo-client

AWS AppSync: pass arguments from parent resolver to children

僤鯓⒐⒋嵵緔 提交于 2019-12-21 04:41:04
问题 In AWS AppSync, arguments send on the main query don't seem to be forwarded to all children resolvers. type Query { article(id: String!, consistentRead: Boolean): Article book(id: String!, consistentRead: Boolean): Book } type Article { title: String! id: String! } type Book { articleIds: [String]! articles: [Article]! id: String! } when I call: query GetBook { book(id: 123, consistentRead: true) { articles { title } } } the first query to get the book receives the consistentRead param in

Custom filtering on subscription in AWS AppSync

◇◆丶佛笑我妖孽 提交于 2019-12-10 12:32:19
问题 Is it possible to have custom filtering logic on subscription in AWS AppSync? As I know, current behavior is: e.g. my schema is like the following type Mutation { createEvent(userId: ID!, event: Event!): Event! } type Subscription { onEvent(userId: ID!): Event! @aws_subscribe(mutations: ["createEvent"]) } Current behavior of AppSync is, when I trigger createEvent, AppSync promise that the subscriber of Subscription receive the Event if the userId are equal. i.e. the filtering logic of AppSync