Tag: graphql
-
415 status code from from simple graphql-http setup
0 I was scanning over the graphql docs to find express-graphql deprecated so I decided to implement the recommended graphql-html version: this is my server.js: import { createHandler } from "graphql-http/lib/use/express"; import { buildSchema } from "graphql"; import http from "http"; import fs from "fs"; import path from "path"; const __filename = new URL(import.meta.url).pathname; const…
-
Get indexed objects with query, not just ids
0 Newby here with amplify and graphql. I am using amplify v6: https://docs.amplify.aws/react-native/build-a-backend/graphqlapi/data-modeling/ for react native. I was under the impression that graphql would return actual objects within an index, not just the objects id. So I think I have something configured wrong in my schema.graphql since all the queries are generated for me. Or,…
-
useMutation does not work from react front end but works in apollo client with same variables Mutation.js
0 I am trying to executate a mutation called createGroup, when i do it graphQl apolo clients it creates the group in firebase collection successfully but in the react frontend it does not work. When the create button is clicked in the appolo dev tools it shows as mutation started but nothing happens on firebase.…
-
Example of a GraphQL query where there are multiple different filter types on a single record type depending where it is located int he query tree?
-1 I am asking ChatGPT for help deep diving into GraphQL query possibilities, as I’m toying around with making a JSON variant of GraphQL for learning purposes. One thing I’m perplexed about and have been for quite some time is how you can support query input arguments/parameters on one node but not on another of…
-
How to update apollo cache
0 I am wondering why it’s very hard to update a data inside of apollo client cache, comparing to similar libraries like react-query it’s too complicated For example, When I have a query with pagination (offset and limit) and get an array of items, When I perform a mutation on one item , and from…
-
In graphql what is difference between a `type query` and `extend type query`?
0 In graphql what is difference between a type query and extend type query? Ex: difference between type Query { product(id: String!): Product } and extend type Query { DeviceDetail(devId: String!): DeviceDetail } Will appreciate if you could add an example for your explanation. graphql graphql-java spring-graphql netflix-dgs Share Improve this question Follow asked 1…
-
Best way to performantly resolve nested GraphQL queries with MongoDB
0 I am trying to write a resolver which gets the accounts belonging to a customer. The parent.accounts attribute is an array of account_ids. In the code below, I attempt to get an array of accounts for each customer. import Account from "../models/accounts.js"; import Customer from "../models/customers.js"; import { AccountInterface } from "../types/accounts.js"; import {…
-
loading queries from .graphql files and use them with apollo client and react
0 Hi guys basicalle I’m creating an app using react, graphql and apollo client, currently I,m loading the queries from a .tsx file with this kind of structure const MULTIPLE_WELLS_FROM_TAO2 = gql` query { query_multiple_wells_from_tao2db { selected_well { opru_fld_nme { value } prod_govt_lse_nbr { value } well_cmpl_seq_nbr { value } } } } `; and…