Questions

  • Proceesing 2 queries apollo graphql that have same type into 1 array

    0 I have 2 queries that have same type I tried to insert findOrderByOid into [FindOrderByRestaurantId] like this var orderListData: ArrayList<FindOrderByRestaurantIdQuery.FindOrderByRestaurantId?> = ArrayList() fun getOrderList(){ scope.launch { apolloBuilder.apolloBuild().query( FindOrderByRestaurantIdQuery( id = "1" ) ).execute().apply { orderListData = data?.findOrderByRestaurantId?.toCollection(ArrayList()) ?: ArrayList() } } } fun getOrderDetail(){ scope.launch { apolloBuilder.apolloBuild().query( FindOrderByOidQuery( oid = "15" ) ).execute().apply { […]

  • Mocking and unit testing graphql-dotnet

    0 I’m using graphql-dotnet library to query some GraphQL APIs from my C# code. Is there a way to easily mock the GraphQLHttpClient in unit tests? c# unit-testing graphql moq graphql-dotnet Share Follow asked 1 hour ago Dawid RutkowskiDawid Rutkowski 2,66711 gold badge3030 silver badges3737 bronze badges 2 what did you try yourself? – MakePeaceGreatAgain 42 […]

  • Shopify GraphQL “cartLinesAdd” API

    1 When I hit this Shopify GraphQL "cartLinesAdd" API to add product to my shopping cart, in response it says invalid ID. So, can anyone please help me to find out what’s wrong here? graphql postman shopify storefront Share Follow asked Sep 8, 2021 at 14:43 Prãshant SaraswatPrãshant Saraswat 33622 silver badges1414 bronze badges 1 […]

  • What does GraphQL do that REST can’t do?

    -3 I’ve been seeing that GraphQL allows the user to limit the data they receive, but that can be quite easily done on a REST API. You can have a, for example, /users endpoint that takes a query array in the request body, that limits the columns returned from the server. Or is there something […]

  • Strange behaviors of Extend in Typescript

    6 I am currentlu working with the Effect Ts lib. In it I saw something I don’t understand: export declare const typeSymbol: unique symbol export type typeSymbol = typeof typeSymbol type FilterIn<A> = A extends any ? typeSymbol extends keyof A ? A : never : never type FilterOut<A> = A extends any ? typeSymbol […]

  • How to set initialState using Redux Toolkit with data using Apollo’s useQuery?

    0 I am trying to call the useQuery hook (something not allowed outside of functional components), in a redux toolkit slice. Is this something that is doable, perhaps using createAsyncThunk or some similar method? My application is built with the MERN stack, so my database is MongoDB, and I’m using Graphql to fetch the data. […]

  • GraphQL iOS Apollo Client Automatic Persisted Queries Causing a Crash

    1 Looking to get some help with setup of APQ’s on the iOS Apollo SDK, using version of Apollo 1.2.2 and when turned on the APQ as: let transport = RequestChainNetworkTransport(interceptorProvider: provider, endpointURL: url, autoPersistQueries: true) Getting an error on query fetch as: Apollo/RequestBodyCreator.swift:47: Fatal error: To enable autoPersistQueries, Apollo types must be generated with […]

  • Ignoring method in my object with HotChocolate GraphQL

    0 I have a class that I expose with Hotchocolate and GraphQL. In this class I have some properties and a public method with the following signature : public Expression<Func<Parcelle, bool>> ToLambdaExpression() By default, Hot Chocolate picks up the public method and exposes them as fields in the graphql schema. I managed to ignore them […]

  • How To Config Apollo Sandbox for GraphQL in NestJS?

    1 I am trying to use Apollo Sandbox for GraphQL in NestJs since I had to upgrade to apollo/server from apollo-server-express. I added the configuration like described in the NestJS docs. I also checked the Apollo Docs. My setup is now like described here. Here is what I use: "@apollo/server": "^4.7.3", "@apollo/server-plugin-landing-page-graphql-playground": "^4.0.1", "@nestjs/apollo": "^11.0.6", […]

  • Take paired differences of pairs of rows

    7 Create a new variable that is the difference of two adjacent rows of ‘price’ variable in the data set, where the new variable is the squared difference. test <- data.frame(id = c(6, 16, 26, 36, 46, 56), house = c(1, 5, 10, 23, 25, 27), price = c(79, 84, 36, 34, 21, 12)) where […]