0 I’m writing a test where I expect an error message to show. This is the component I’m testing: export const CourseOverview = () => { const { data, isError, error, isSuccess } = useGetCourses(); if (isError) { return <div>{error.message}</div>; } if (isSuccess) { return ( <CourseAccordion items={data.courses} /> ); } return <div>Loading…</div>; }; useGetCourses […]
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 { […]
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 { […]
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 […]
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 […]
-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 […]
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 […]
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. […]
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 […]