Questions

  • Invariant Violation: When using graphql Mutation on nextjs 13

    0 all my query is working well, except for my graphql mutation. hope you can help. I’m using the same code on my other project, the only difference is this form is inside a modal. error on showing And I know this mutation on my playground is working graphql playground working mutation here’s my full […]

  • graphql variable types

    0 I use https://github.com/shurcooL/graphql for graphql queries and I need to make the following mutation: mutation createPromotion($input: CreatePromotionInput) { createPromotion(input: $input) } with the following graphql variables: { "input": { "channel": "my_channel", "offerType": "my_offer_type", } } In my code it looks like this: type CreatePromotion struct { CreatePromotion graphql.String } func (g *Gate) CreatePromotion(ctx context.Context) […]

  • golang graphql variable types

    -1 in my golang project I use https://github.com/shurcooL/graphql for graphql queries and I need to make the following mutation: mutation createPromotion($input: CreatePromotionInput) { createPromotion(input: $input) } with the following graphql variables: { "input": { "channel": "my_channel", "offerType": "my_offer_type", } } In my code it looks like this: type CreatePromotion struct { CreatePromotion graphql.String } func […]

  • Combining Fields from user input content fragment in grapgql

    0 There are 2 tag fields in my content fragment model lets assume the names as tag1 and tag2. User creates a content fragment and selects the desired tag values. But I want to take these 2 values and combine them with an underscore. is there any command that permits this in graphql or is […]

  • GraphQL Reduct Response

    0 I have a response from GraphQL which is similar to: "data": { "x": { "y":{ "nodes": [ { "id": 123 }, { "id": 123 }, { "id": 456 } ] } } } Is there a way to reduce this so that no duplicate IDs come, using the graphQL query. graphql Share Follow asked […]

  • Promise.all is only executing 1 out of 3 promises I pass to it

    0 I have an async function, in which I take some arguments. Based on what is passed as argument, I call another function. You can consider the structure to be something like this. async function createTaskReminder(val) { switch (val) { case 1: await call1(); case 2: await call2(); case 3: await call3(); } I call […]

  • Authenticate Apollo Client to AWS AppSync with Cognito User Pools

    5 I am trying to connect to my AWS AppSync API using the plain Apollo Client but I am not sure how to structure the authentication header correctly. So far I have followed the header authentication documentation here: https://www.apollographql.com/docs/react/recipes/authentication.html And have this code, which I adapted to include the token call to the Amplify authentication […]

  • Why does ranges::for_each return the function?

    10 The legacy std::for_each returns function as the standard only requires Function to meet Cpp17MoveConstructible according to [alg.foreach]: template<class InputIterator, class Function> constexpr Function for_each(InputIterator first, InputIterator last, Function f); Preconditions: Function meets the Cpp17MoveConstructible requirements. [Note: Function need not meet the requirements of Cpp17CopyConstructible. end note] This is reasonable since the user may want to […]

  • Is it ok to use std::ignore in order to discard a return value of a function to avoid any related compiler warnings?

    10 I know that you can use static_cast<void>, but it just seems too verbose for me, and not reflecting the original intent that I want to discard a return value, not to cast it to anything. Recently I stumbled upon std::ignore, which can accept a value of any type, the name is clear and readable, […]

  • How do you create a template with replaceable variables for JS/React?

    0 Context: I want to create a GraphQL query template with different variables that I can replace with key/values from another dictionary I want to give JS/React this template and dictionary and be able to replace the variables in the template with the corresponding values in the dictionary How would you recommend I do this? […]