Tag: graphql
-
object Object at handleError graphql
0 I am creating a react app using amplify and graphql my graphql schema is type Note @model @auth(rules: [ { allow: public } ] ){ id: ID! name: String! description: String image: String noteBook: NoteBook! } type NoteBook @model @auth(rules: [ { allow: public } ] ){ id: ID! name: String! notes: [Note!] }…
-
Facing incompatible module issue with inotify when try to install codegen
0 I tried to install codegen in react application using the below comment npm install –save-dev @graphql-codegen/cli @graphql-codegen/typescript @graphql-codegen/typescript-operations @graphql-codegen/typescript-react-apollo and i got the below error yarn add v1.22.19 [1/4] 🔍 Resolving packages… [2/4] 🚚 Fetching packages… error [email protected]: The platform "darwin" is incompatible with this module. error Found incompatible module. info Visit https://yarnpkg.com/en/docs/cli/add for…
-
Using the Apollo GraphQL client for Android
3 I am using from the below sample, but it gets me an error when I add libraries: Using the Apollo GraphQL client for Android Below is my build.gradle file (project): // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() maven { url "https://jitpack.io" }…
-
GraphQL: Only fetch objects with a certain property equals `null`
0 I have a GraphQL query query testQuery { books { title isbn publisher metadata { propertyA propertyB propertyC } } } In the GraphQL schema, metadata is an optional field. The other three are required, and all of them are string. My question: I only want to filter items where the metadata is null…
-
How to use mixins in TypeGraphQL to replicate “traits” and extend types?
1 I am trying to replicate the idea of "traits" from PHP into TypeGraphQL types. However, between abstract classes and mixins, I got a bit lost and can’t figure out what even to google…. I would like to have a bunch of traits that I can add to my types to reduce the amount of…
-
How to implement Relay node query with GraphQL federation
3 We are trying to implement Relay node query with Apollo federation. Since Apollo is not aware of Relay, we have to implement the node query in some service (Node Resolution Service) interface Node { id: ID! } type Query { node(id: ID!): Node! } The trouble is that the Node resolution service is not…
-
ApolloClient not setting authorization header
0 I have an expo app that is using a graphql api endpoint. I am attempting to pass an authorization token with each request, but my set up does not seems to be setting or sending my authorization header. In my graphql.config.yml I can set the authorization header here like this and it works: schema:…
-
GraphQL: TypeError: Cannot read property of undefined
2 I have an Apollo GraphQL projects where I have created my own Query and Mutations. I have done using mock data and Query and Mutation works fine. But when I am trying to do with Sequelize ORM, I am getting the error "TypeError: Cannot read property ‘getListings’ of undefined", " at listings (/home/ayman/Desktop/apollo-graphql/graphql-app/functions/graphql.js:50:19)", "…
-
401 error returned on graphQL api on react.js app hosted by aws-amplify (AuthMode: “AMAZON_COGNITO_USER_POOLS”)
0 I’m trying to set up a web app using react.js hosted by amplify on AWS, which I will need to store user preferences of certain categories in a dynamoDB table. Users must authenticate with Cognito before being able to view/interact with their preferences. I have been having a hard time trying to connect to…