6 From this Haskell Cafe post, and borrowing some code examples from jyp, we can construct a simple PHOAS evaluator in Haskell as: {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} import Data.Char data Term v t where Var :: v t -> Term v t App :: Term v (a -> b) -> Term […]
-1 I’m using graphql in Vue and I came up with this problem! This is my code for calling graphql in store: async fetchBookContent({ commit }, data) { let token = data.token let bookId = data.bookId const ALL_BOOKS_QUERIES = gql` query { book(args:{token:${token},bookId:${bookId}}){ information{ name } } } ` const { result } = useQuery(ALL_BOOKS_QUERIES) […]
0 i have deployed asp.net in docker on ec2 instance ECS, with load balancer controller weatherforecast working corectly hotchocolate graphql UI doesnt work on aws, on localhost docker works fine. I test on postman, and works fine, schema fetched. Can you help with aws settings, for graphql working My actual program.cs builder.Services.AddGraphQLServer().AddQueryType<GraphQls>(); builder.Services.AddCors( options => […]
0 I have the following graphql. input UpdateStudentInput { name: String motherName: String birthDate: String gender: Gender email: String password: String avatar: String } And I have the following mutation: updateStudent(updateStudentInput: UpdateStudentInput!, studentId: String): Student! but when I try to mutate I get a validation error : mutation { updateStudent(updateStudentInput: { name: "Abner Matheus Gomes […]
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, […]