Tag: graphql
-
Installing vendor library using composer
0 I’m trying to use the https://github.com/webonyx/graphql-php/ library to make graphql requests.. But for some reason it doesn’t work, and I can’t figure out why. I’m using this command to install: composer require webonyx/graphql-php Vendor folder with content + composer.json / composer.lock appears in the project folder. When I try a simple code like: <?php…
-
How do you mask sensitive request params in gqlgen?
1 I am currently using gqlgen and would like to log request parameters for error investigation purposes. While I know how to access request parameters like below, I am concerned that this way may log sensitive information such as email addresses or passwords. srv.SetErrorPresenter(func(ctx context.Context, err error) *gqlerror.Error { goc := graphql.GetOperationContext(ctx) fmt.Println(goc.Variables) // i…
-
Can’t consume context in my mutation resolver, request object passed instead Apollo Server v4
0 I am trying to pass the pubsub to resolvers. I am able to pass pubsub to subscription ‘subscribe’ functions via the useServer function, and as far as I can tell from research the expressMiddleware context should be passed to all resolvers, but when logging it out I’m just getting the request object. index.ts const…
-
How to refetch all queries after a mutation?
0 Using apollo graphql, I have a mutation that modify the "Person" object in the database All throughout the app, I have various queries to fetch that from "Person". Sometimes I need the whole object, sometimes only the name or the age. There is a list of persons (generated using the PERSON_IDS query) and when…
-
Set up dynamic routes in Astro with GraphQL fragments query doesn’t work
0 I am trying to setup dynamic routes in Astro SSR mode. From the api I can use the following query (it contains fragments): I am using Apollo Client. const GET_PAGE = gql` query Page($target: String!) { page(target: $target) { type content { … on PageOne { url: anotherKey title: anotherTitleField id } … on…
-
Set up dynamic routes in Astro SSR mode
0 I try to create dynamic routes in astro SSR mode. I am using Apollo client. I have this grapql query from the api: const GET_PAGE = gql` query Page($target: String!) { page(target: $target) { type content { … on MyPage { id url } } } } `; So based on the target variable…
-
Duplicate requests when using apollo client in electron.js
0 In electron.js I have basic component that has two useQuery hooks. When the component re-renders the hooks fire and should result in 2 calls in the network tab. However there are 3 or sometimes 4 requests. Looks like the apollo cache is not working. If remove one hook and fire the other one multiple…
-
Get Result from apollo client error undefined
0 I’m trying to use the result I’m getting from my apollo client. but it keeps giving me error of undefined although the request send was success in network. It means I cannot get access to the result like normal! the code in my store is: async questionSearch({ commit }, data) { const ALL_QUESTION_SEARCH =…
-
How to use OR / AND in graphql query filter or make a case insensitive filter?
19 Just like the post ask I need to be able to search with 3 possible scenarios. I need to have all uppercase, or lowercase, or normal casing. If that is not possible is there a way to do a case insensitive filter instead? allMarkdownRemark(filter: { brand: { eq: $normalBrand } }) { //==> Need…