Tag: apollo-client
-
GraphQL throws error of non-nullable field on a nullable field
0 I’ve the following schema type Employee { id: UUID! createdAt: Time! updatedAt: Time! lastActivity: Activity } type Activity { id: UUID! createdAt: Time! updatedAt: Time! } extend type Query { Myself: Employee! } The lastActivity may or may not be present of course, but when querying it from my client it throws the following […]
-
Enum values casting not retained in Apollo graphQL java code generation
0 I have defined following enum type in my graphql schema enum TimeUnit { Day Week Month Year } I am using apollo graphql client and generating models which create a java enum like: public enum TimeUnit { DAY("Day"), WEEK("Week"), MONTH("Month"), YEAR("Year"), /** * Auto generated constant for unknown enum values */ $UNKNOWN("$UNKNOWN"); private final […]
-
Typescript and Graphql Fragments
0 I use codegen to generate TS types and I use Apollo client to send queries to server. when I generate code for the following example, Typescript dosen’t know that people has firstName and lastName fields, It only knows that avatar field exists. If I remove fragment and move fields directly to query all fields […]
-
“Mime type of document could not be determined” Error on Apollo Server
0 I was given a link for a graphQL server with already built in queries and mutations. When I tried to run a mutation, I got the following response: { "data": {}, "errors": [ { "message": "Mime type of document could not be determined" } ] } What could be the problem and how can […]
-
How to create Ember Service that fetches data from Apollo GraphQL Server
0 I successfully fetched data from Apollo GraphQL Server in Amber route using ember-apollo-client. I tried the same approach to have a service fetching data but I’m getting Uncaught TypeError: this.apollo.query is not a function from app/services/nav-categories.js. Minimal Working Example Start a new app using $ ember new super-rentals –lang en $ ember generate service […]
-
Pass dynamic key value in grapql query React Native
0 hello all I develope application in react native with qraphql so here is my one of the query { products( filter: {category_uid: {eq: "Mw=="}, bestseller: {eq: "44"}} sort: {name: ASC} pageSize: 10 currentPage: 1 ) { total_count items { uid name sku boutique_name small_image { url label } } } } So in above […]
-
Triggering one query is triggering other related ones
0 I suppose its because of cache? But i have Query01 that i trigger using a button click, and Query02 that had run previously, when Query01 runs, it reruns query 02. What is going on?? Here’s the structures: query Query01( $patientId: Something! $externalId: String $externalEncounterId: String! ) { patient(patientId: $patientId) { pastMedicalHistory {} prescriptions {} […]