5 I have a React application with ApolloClient with Apollo-Link-Schema. The application works fine locally but in our staging environment (using GOCD), we get the following error: Uncaught Error: Cannot use e “__Schema” from another module or realm. Ensure that there is only one instance of “graphql” in the node_modules directory. If different versions of […]
1 I have below User graphql API endpoint in my application. Query class Query(UserQuery, graphene.ObjectType): all_users = DjangoFilterConnectionField( UserType, filterset_class=UserFilter) Type class UserType(DjangoObjectType): class Meta: model = User fields = "__all__" interfaces = (graphene.relay.Node,) Filter class UserFilter(FilterSet): user_name_search = CharFilter( method=’user_name_filter’, label=’User Name Search’ ) class Meta: model = User fields = [ ‘user_name_search’, ‘user_id’, […]
0 I couldn’t use Graphql Codegen’s client-preset-swc-plugin with Vite at all to reduce the bundle size. It panics when trying to build for production, I’m getting this error: [vite-plugin-pwa:build] failed to handle: failed to invoke plugin: failed to invoke plugin on ‘Some("/home/user/project/web/src/index.tsx")’ Caused by: 0: failed to invoke `/home/user/project/web/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm` as js transform plugin at /home/user/project/web/node_modules/@graphql-codegen/client-preset-swc-plugin/swc_plugin.wasm […]
17 I’ve been working on a project lately, which has node.js + express + typescript + Apollo server stack. And while researching on Apollo client, I’ve stumbled upon TypeScript section. But nothing like that was for server, which leaves me to freedom of choice in this case. So the question is: are there any best […]
1 Problem Statement : I have a GraphQl query defined which is responsible for fetching few details from the database. This graphql schema let’s say is defined in microservice-B . Now I want this garphql API to be called by an upstream microservice-A. microservice-A is actually the one which is actually called by our Clients(UI […]
7 I was writing a simple C++ program that generates a list of random integer values from a normal distribution, then takes first N generated items and filters them so that their absolute value is greater than 42. The code i wrote is the following: int main() { //convenience namespace rng = std::ranges; namespace view […]
0 I’m new to Apollo Client and I want to test API endpoint to fetch the data. const client = new ApolloClient({ cache: new InMemoryCache(), link: new HttpLink({ uri: "https://api.thecatapi.com/v1/breeds", useGETForQueries: true }), }); client .query({ query: gql` { id name } `, }) .then((result) => console.log(result)) In data field I keep getting undefined. I […]
0 I was was below question in Netskope system design interview recently i.e. design APIs for below functionalities (full URL path with HTTP method) and I could not answer well so I was rejected. I pasted my solution below. I could not find a solution using google search. Can you please provide some solution? 1. […]
1 I’m working on a project where I have posts that are created and shown on a screen. I’ve done this using graphql subscriptions for real time updating of posts, but I need the user to also be able to delete their own posts and for that update to be shown in real time. The […]