Skip to content
Advertisement

Tag: graphql

ApolloError: Fragment was used, but not defined

I have this in my complicated app: Basically, I have an export button which will export a CSV of my GraphQL data. I manually call client.query to fetch the latest data on click of the button, but it throws an error saying it can’t find the used fragment StuffTable. How do I include that fragment in the query? I am

GraphQL – “Field “updateOwner” of type “Owner!” must have a selection of subfields. Did you mean “updateOwner { … }”?”

I’m trying to get Mutation Update query in GraphQL Playground. I’m basic level in GraphQL and in learning phase. I don’t know how to create udpate Mutation for the below Owner code. Any idea what I’m missing in my code / query? —Resolver— —Service— —dto— —entity— —schema— —GraphQL Query (I don’t know whether it is correct or wrong) —error— Answer

How to Make a ShopifyQL query?

Shopify recently announced ShopifyQL for easier accessing of analytics data. However, I’m unclear of how to actually make a ShopifyQL call. They do include an example. However, using the GraphiQL tool to run the query hits a number of errors: I also tried making an authenticated call with the example query above using my app’s Node server, but ran into

Apollo Client useQuery making un-necessary refetches upon Next.js router.push

I’m dealing with an issue in which a query inside a useQuery Apollo Client hook is getting un-necessarily re-run whenever Next.js’s router.push (docs here) is called. The abbreviated code is: You can see a reproduction on CodeSandbox here. My expectation is that whenever the button is clicked (and thus router.push is called), the query shouldn’t be re-run. However, it’s re-run

Error: No “exports” main defined in graphql-upload/package.json

Have installed graphql-upload, do import { graphqlUploadExpress } from ‘graphql-upload’; And getting this error: Error: No “exports” main defined in graphql-upload/package.json Dependencies: The version of node: v16.10.0 Answer So the problem was in the .default build settings. You can remove it, but when we removed it we saw the problem with other modules, so we resolved this issue via this:

Saving the state of the button onClick

I have: This pattern works fine, but whenever on the page more then 1 attribute and user select more then one, previously selected button gets unclicked. My question is: How can I save the state of 1st selected button after clicking on 2nd one? for each attribute only one button can be active buttons name should be used Answer You

Advertisement