9 On this interesting blog post about pattern matching, there is some code with a method signature of (*) class Request < Data.define(:path, :scheme, :format) def deconstruct_keys(*) { path: @path, scheme: @scheme, format: @format } end def deconstruct(*) path.split("/").compact end end This is different than def a_method(*args) I could not find any information in the […]
2 I’m currently working on a GraphQL/Node/Express server that retrieves data from another API. I have absolutely no access to the other API except for the data I receive back. My problem is that the response is XML and there are certain fields that should be returned as arrays but instead are being returned as […]
0 On the following graphql I need sorting/order on the WPChildren with the ‘menuOrder’ item… query ($id: String!) { allWpPage( filter: {id: {eq: $id}} ) { edges { node { id title uri content children { id } blocks } } nodes { wpChildren { nodes { id … on WpPage { id title uri […]
0 I am very new to GraphQL. Below is my init method in my Resolver public void init() { builder.type("SystemTopic", typeWiring -> typeWiring .dataFetcher("items", this::itemsConnection).dataFetcher("payloads", this::getPayloads)); } I need the data fetched in items in fetcher in payloads fetcher. The seconds fetcher payloads execution starts before items done its job. So, some required data is […]
0 I’m using Nuxt 3 and fetching data from Strapi with Apollo and graphQL. I have used this similar setup with Prepr in the past with no issues. My GraphQL query is correct and it is returning data but the problem is in the timing. here’s the code I’m using in my page in Nuxt […]
1 I am playing around the code: https://codesandbox.io/s/restless-framework-uldf4q?file=/src/App.js import React, { Fragment } from "react"; import { gql } from "apollo-boost"; import { useQuery } from "@apollo/react-hooks"; const GET_DOG_PHOTO = gql` query Dog($breed: String!) { dog(breed: $breed) { id displayImage } } `; const breed = "dingo"; const App = () => { const [count, […]
0 So I am currently trying to get all publication channels I can publish products at and am a bit confused… The channels query is depricated: https://shopify.dev/docs/api/admin-graphql/2023-07/queries/channels The publications query should be fine as of the documentation: https://shopify.dev/docs/api/admin-graphql/2023-07/queries/publications But if I exec the query, i get a deprication error: // Query: query publications { publications(first: […]
0 I’m trying to paginate the relations through a parent pivot. A user has topics and a topic can have multiple users. Multiple users can be the owner of a topic. A topic has messages. class Topic extends Model { //Casts Fillables etc. public function user(): BelongsToMany { return $this->belongsToMany(User::class, ‘topic_users’, ‘topic_uuid’, ‘user_uuid’) ->withPivot([ ‘uuid’, […]
0 I am using graphQL in react native project. I am passing headers (cookie/authorization) in context object of query, in useMutation or useQuery. [Problem is only on iOS App] The basic system of the app is user signup the profile, and verify, on initial signup the property finishedAccountSetup: false is false. so when they log […]
1 I’m trying to use the GitHub GraphQL API to get all the additions made by a user (additions can be found from their commits). I’ve been able to get the additions from pull requests, but I haven’t found a way to do the same for commits. How can I get all the commits from […]