graphql-subscriptions

Error: Can only create List of a GraphQLType but got: function GraphQLObjectType(config) , in GraphQL?

爷,独闯天下 提交于 2019-12-08 13:34:34
问题 I am working on a demo project on GraphQL. But stuck here. I want to send the whole object as result. The object which I want to send is: exports.fakeDatabase = { 1: { id: 1, name: 'Abhay', description:'This is Abhay\'s Database' }, 2: { id: 2, name:'Bankimchandra', description: 'This is Bankimchandra\'s Database' }, 3: { id: 3, name:'chandu', description: 'This is chandu\'s Database' } }; But when I am sending a request to access it I got Error: Error: Can only create List of a GraphQLType

AWS AppSync Authorization

北战南征 提交于 2019-12-03 06:58:24
I'm planning to use AWS Appsync to migrate a graphQL endpoint in a lambda function, which is being triggered by a POST via the API Gateway. I'm looking into AppSync mainly because of the subscriptions, which I can't create using a Lambda function. My Authentication mechanism is based on Auth0, using passwordless, and my authorization mechanism in based on the data from several tables in DynamoDB and it's embedded in the graphQL resolvers, as recommended by Facebook and Apollo. What is more, it is based on every part of the request, which includes checking permission to invoke the query

Uncaught TypeError: Can't add property 12, object is not extensible

让人想犯罪 __ 提交于 2019-11-30 21:23:26
I can't seem to understand the error I am getting on my client application. I am subscribing to a graphql subscription and I am able to retrieve the updates but I am not being able to push the changes to the typescript array called "models:ModelClass[]" which is bound to the view. Is there something I am missing or doing wrong? models.component.ts this.apollo.subscribe({ query: gql` subscription { newModelCreated{ _id name type train_status deploy_status data_path description created_at updated_at } } ` }).subscribe((data) => { console.log("CREATED: " + JSON.stringify(data.newModelCreated));

Uncaught TypeError: Can't add property 12, object is not extensible

别来无恙 提交于 2019-11-30 05:16:22
问题 I can't seem to understand the error I am getting on my client application. I am subscribing to a graphql subscription and I am able to retrieve the updates but I am not being able to push the changes to the typescript array called "models:ModelClass[]" which is bound to the view. Is there something I am missing or doing wrong? models.component.ts this.apollo.subscribe({ query: gql` subscription { newModelCreated{ _id name type train_status deploy_status data_path description created_at