Tag: graphql
-
How do I make GraphQL API requests using fwconsole in FreePBX?
0 FreePBX has a GraphQL API which allows us to make requests such as the ones documented here. I would like to use the fwconsole api command to make these API requests at the command line. There’s no documentation for how to do this – the only forum post I could find was someone asking…
-
“Extract” mutation name from an “OperationDefinitionNode” Object?
1 I am using the webonyx/graphql-php and Laravel. I have a single middleware that "catches" all graphql requests and I would like to apply some logic to filter some requests depending if the request is a mutation and which mutation it is. I "intersect" the graphql query (similar to this one) where the mutation storeCC…
-
GraphQL : `_contained_in` syntax for search matching key and value pair from jsob field
0 Unable to create Query for _contained_in using Hasura Graphql _contains Query query MyQuery($data_rule_list: jsonb) { mbr_pgm(where: {nom_org_id: {_eq: "XXX"}, data_rule_list: {_contains: $data_rule_list}}) { data_rule_list key_wrd_txt updt_ver_nbr } } Variable : { "data_rule_list": { "offerNumber": "0196819" } } Facing Issue to Create _contained_in query If Query for _contained_in is : query MyQuery($data_rule_list: jsonb) { mbr_pgm(where:…
-
How to properly implement GraphQL resolvers
1 I am creating a basic Graphql project. In this project I am only fetching user details. The data is stored in database. Here is the GQL schema: type User { id: ID! username: String! email: String! age: Int address : String firstname: String lastname :String } type Query { getUserById(id: ID!): User } When…
-
GitHub GraphQL fetch repositories that are not archived
5 Is there a way to fetch only the repos that are not archived? { user(login: “SrikanthBandaru”) { id email isHireable name repositories(first: 100) { # fetch only the repos that are not archived edges { node { name isArchived shortDescriptionHTML description descriptionHTML repositoryTopics(first: 10) { edges { node { topic { name } }…
-
Regarding dynamic field selection in apollo-server
0 I’m using apollo GraphQL for backend and frontend. I want to dynamically select fields which are requested by the client. With the help of info argument I created a function which gives me selected fields by client and based on that I fetch selected fields from db. Resolver selection.fields = .extractSelection(info?.fieldNodes[0]?.selectionSet) function implementation .extractSelection…
-
Graphql-WS subscription always returning the whole data set instead of the the delta
0 I am using the graphql-ws library for subscribing to the following data: export const x = gql` subscription x($user_id: uuid!, $contact: uuid!){ chats(where: { user_id: { _eq: $user_id }, contact: { _eq: $contact }}) { title }` I subscribed as follows: const subscription = client.subscribe({ query: x, variables: { user_id: …, contact: … }…
-
Unexpected error object with mock-service-worker and react-query with graphql
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…
-
Proceesing 2 queries graphql response that have same type into 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 {…