Questions

  • 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> ) […]

  • Improve local visibility for letslearngraphql.com

    If you are looking to rank your local business on Google Maps in a specific area, this service is for you. Google Map Stacking is a highly effective technique for ranking your GMB within a specific mile radius. More info: Google Maps Pointers Thanks and Regards Mike Adrian PS: Want a comprehensive local plan that […]

  • Apollo extension config 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 […]

  • How to generate GraphQL query from protocol buffer generated code with gqlgen?

    0 I have a protocol buffer file which includes an enumeration within a message. message Advisor { … enum AdvisorRole { // here be values } } This pb is the input to generate stubs using protoc-gen-gogo. ../gen/ProjectService.pb.go type Advisor_AdvisorRole int32 const ( // here be constant values ) The generated code is in time […]