Questions

  • module.export = {} with Vite React

    0 I created a react App with Vite, and I want to use Apollo extension to get Intellisense when building GraphQL queries. According to the extension docs, I created an apollo.config.js file at the root with this code : module.exports = { client: { service: { name: "my-graphql-app", url: "https://localhost:4000/graphql", }, }, }; But since […]

  • Working Shopify GraphQL API for automating photo uploads, but I keep running into a string formatting error

    0 I’ve tried adjusting the formatting to work but I keep running into the same error regardless of the changes. I’m new to GraphQL and Shopify so I’m a little stumped. The goal I’m trying to achieve is automating uploading some where around 2000 photos to a shopify store, and doing so based on a […]

  • How to avoid manual inlining inside LINQ query to use as an expression and convert to SQL

    0 I am trying to do some projections in LINQ to convert to DTOs. The goal is to do it with expressions so that it is translated directly to SQL. It works perfectly if I do everything inlined like this : return workHeader.Select(x => new WorkHeaderDto { Id = x.Id, StartDate = x.Works.Min(w => w.StartDate), […]

  • How to query _entities in Apollo Router?

    0 While resolving GraphQL request, Apollo Router makes requests that include field _entities(representations: $representations) to internal services. However, when trying to issue the same query to externally available Apollo Router, I get an error parsing error: cannot query field ‘_entities’ on type ‘Query’ So, internal service resolves _entities just fine, however Apollo Router return above […]

  • Apollo client modify.cache after receiving data from the subscription sometimes the cache does not update with new data

    0 I am updating the real-time status of the product data with a subscription. Here is my code useProductSubscription({ varibales: { ids: productIds }, onData: ({ data }) => { const dataUpdated = data.productUpdated; if (!dataUpdated) return; const { productId, status } = dataUpdated; cache.modify({ id: cache.indentify({ __typename: ‘Product’, id: productId, }), fields: { status: […]

  • How to call multiple mutations at the same time?

    1 I have an array of ids, and I created a mutation that allow me to delete an item using only 1 id. Is there any way to call this mutation multiple times using Relay.Store.commitUpdate or this.props.relay.commitUpdate ? graphql relayjs Share Improve this question Follow edited Aug 11, 2017 at 1:11 jonathancardoso 11.8k77 gold badges5353 […]

  • Can’t autowire GraphQlTester

    1 My current dependency set-up for demo api: dependencies { implementation ‘org.springframework.boot:spring-boot-starter-graphql:2.7.2-SNAPSHOT’ implementation ‘org.springframework.boot:spring-boot-starter-web’ testImplementation ‘org.springframework.boot:spring-boot-starter-test:2.7.2-SNAPSHOT’ testImplementation ‘org.springframework:spring-webflux’ testImplementation ‘org.springframework.graphql:spring-graphql-test:1.0.0’ compileOnly ‘org.projectlombok:lombok’ annotationProcessor ‘org.projectlombok:lombok’ } Test class: import com.example.demo.dao.ProfileDao; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.graphql.GraphQlTest; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.graphql.test.tester.GraphQlTester; import static org.springframework.test.util.AssertionErrors.assertNotNull; @GraphQlTest //@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) class DemoApplicationTests { @Autowired GraphQlTester graphQlTester; @MockBean […]

  • Alternatives to AWS Amplify DataStore with offline capabilities for GraphQL

    1 I’ve developed a project using AWS Amplify and DataStore. It was a requirement that the app works offline, because most of my users are travelling in areas with poor or no signal. DataStore seemed like a perfect solution, but it has given me far too many problems. Performance is awful when dealing with more […]

  • GraphQL Apollo Server 4: How to set response headers and cookies

    0 I got a basic setup of Apollo Server 4 to be integrated with Azure Functions. I followed this guide: https://www.apollographql.com/docs/apollo-server/migration And for the connection to Azure Functions I’m using the officially supported integration package: https://github.com/apollo-server-integrations/apollo-server-integration-azure-functions#readme I was able to set cookies and response headers with Apollo Server 3, but I can’t get it working […]

  • Getting posts undefined in headless wp with graphQl Next.js

    0 The graphQL query is working https://trialtest1.local/graphql?query={%20posts%20{%20nodes%20{%20slug%20title%20}%20}} But when I ask for posts in next.js it shows undefined. Can anyone see what Im doing wrong? import Link from ‘next/link’ export default function Home( {posts}){ console.log({posts}) return( <div> <h1>Hello From The Home Page!</h1> { posts?.nodes?.map(post => { return( <ul key={post.slug}> <li> <Link href={`/posts/${post.slug}`}>{post.title}</Link> </li> </ul> ) […]