1 I’m using the following query in GraphQL: $q = " { shop { name } } "; But I want to do it dynamically in PHP in the following way: $fieldName = ‘name’; $query = [ "shop" => [ $fieldName ] ]; And later on when passing the query to GraphQL I wanna convert […]
0 I have this mutation to create the product review which is working fine but not able to integrate into the form does anyone how I can fix that ? mutation { createProductReview( input: { sku: "Samsung S21 Ultra", nickname: "Test", summary: "Great looking phone", text: "This phone looks and feels great.", ratings: [ { […]
0 I’ve a Next.js project using the Apollo GraphQL client 3.7.17, where the following code works for me: const { loading, data, error } = useQuery(gql` query GetTeamCurrentWeek($teamId: ID!) { team(id: $teamId, idType: DATABASE_ID) { teamMeta { currentweek } } } `, { variables: { teamId: 715 } } ); If however I change the […]
1 I am building an inventory application with lighthouse and struggling to grasp the concept of serving custom queries with complex logic on demand. This is and approximate query that I am trying to create: { statsReport { dailyTotalSales dailyAverageSales dailTotalItemsSold newDailyCustomersCount etc. } } I was thinking of creating an Obejct that would have […]
0 I am writing a graphql api using .net core+hot chocolate. I have to define all service names while creating graphql server. I have more than 20 service classes. Is there a generic way of specifying these services, I dont want to write 20 + lines of code to specify each service name. addscoped .net […]
0 Context: I have a custom component ( autocomplete with list of options from external api ) that allows me to select an option based on an API request. After the selection, the body of the option becomes part of the structure and looks like this (where ‘type’ is a field of the custom component): […]
0 In many tutorials that I have read, the most common way of using graphql resolvers is like below. export const rootResolvers: IResolvers = { Query: { getUserById: async (root, { id }, context, info) => { return await getUserController(id); }, getUsers: async (root, args, context, info) => { return await getUsersController(); }, }, Mutation: […]
14 Most of the client require GraphQL client library to work with GraphQL API. I know that Tableau supports Rest APIs and wanted to understand if it is possible to use GraphQL based APIs with Tableau? graphql tableau-api Share Improve this question Follow edited Apr 27, 2021 at 10:06 Zoe♦ 27k2121 gold badges118118 silver badges148148 […]
-1 i am using nest-i18n package to use localization in my project but when translating the message i get the error Cannot read properties of undefined (reading ‘service’) Here is my code please help me to find out the exact error Note:- I have tried to add I18nValidationPipe as a provider in app module as […]