Using Apollo Link to Handle Dependent Queries
Apollo GraphQL Blog
by Aryan Goharzad
4y ago
What to do when you can’t just change the schema If you’re using GraphQL and Apollo to build an app, sooner or later you’ll run into cases where there are queries that depend on each other. In an ideal world, each screen would use just one query to fetch all of the information it needs. However, in the real world, you may not always be able to accommodate your front-end needs in the GraphQL backend. Imagine you’re creating a social network app for users from various planets. In each user’s profile screen, you want to display information about the user, such as their name, age, and b ..read more
Visit website
Apollo Client [React]— How to Query on Click
Apollo GraphQL Blog
by Khalil Stemmler
4y ago
Apollo Client [React]— How to Query on Click Use the useLazyQuery hook! Sometimes, you don’t want to fetch data right away- but instead, you’d like to fetch data manually in response to some sort of event, like a button click! In this quick article, I’ll show you how to use the useLazyQuery hook to manually trigger client-side GraphQL queries. Project setup & demo We’re using Apollo Client 3 with React Hooks, and Trevor Blades’ Countries API. You can find the entirety of the code in a Codesandbox here: https://codesandbox.io/s/apollo-client-uselazyquery-example-6ui35 Fetching data in respo ..read more
Visit website
☝️ GraphQL File Uploads with React Hooks, TypeScript & Amazon S3 [Tutorial]
Apollo GraphQL Blog
by Khalil Stemmler
4y ago
Learn how to use GraphQL to upload files with multipart upload requests As time goes on, it looks like more developers are choosing to build their public-facing APIs with GraphQL instead of REST. We’re going to see a lot of the same problems people were solving with REST, solved with GraphQL, in a much cleaner and enjoyable way. A common task in a lot of web applications is performing file uploads. Luckily, if you’re using Apollo Server, uploads are enabled by default. By adding the Upload type to our Apollo Server type definitions, we enable the ability to upload files from the client. If we ..read more
Visit website
Roadmap to your data graph: webcast and Q&A series
Apollo GraphQL Blog
by Julia Black
4y ago
We’re bringing back some of the most popular talks of GraphQL Summit followed by live Q&A’s with the Apollo engineers who gave them. They share guidance and concrete steps to build, maintain, and protect your data graph, whether you’re currently exploring and prototyping with GraphQL, working on shipping your first feature or an entire product, or considering rolling out to a data graph to your entire organization. Read more about the talks and sign-up below. We look forward to answering your questions! The GraphQL developer experience Thu, Nov 14–10am PDT. Presenter: Daniele Man, Eng ..read more
Visit website

Follow Apollo GraphQL Blog on FeedSpot

Continue with Google
Continue with Apple
OR