The Apollo community is made up of developers around the world building client-side experiences on top of the data graph.
If you’re as excited about the data graph as we are, one of the best ways to help the community is to write about your experience! We love community blog posts, and we’d love to work with you to get your post published on the Apollo blog.
Submit your idea using our 👉 Blog Post Proposal Form!
Don’t worry, your first draft doesn’t have to be perfect! We’ll work with you to transform it into an awesome blog post.
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.
You can find the entirety of the code in a Codesandbox here:
Here’s the relevant code sample, we import
@apollo/client, write a
GET_COUNTRIES query, and define the
getCountries function that we use to invoke the query.
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 build a mutation that utilizes the
File Uploads have an interesting history in the Apollo ecosystem.
With Apollo Server 2.0, you can perform file uploads right out of the box. Apollo Server ships with the ability to handle multipart requests that contain file data. This means you can send a
mutation to Apollo Server containing a file, pipe it to the filesystem, or pipe it to a cloud storage provider instead.
While this approach works and is relatively trivial to implement, it does come with drawbacks. …
This year, I flew out to San Francisco to attend (and help host!) my very first GraphQL Summit.
As a Canadian flying to San Francisco for the first time, I was delighted to escape the Toronto cold to explore a new city, meet my awesome new Apollo colleagues, hang out with puppies (oh yeah—we had a puppy booth 🐶), chat with devs from around the world, and of course learn everything I could about the present and future of GraphQL.
From the two days of talks, roundtables, and hallway conversations, some exciting themes emerged at Summit:
Landing your first junior developer job is an amazing accomplishment. You’ve worked really hard towards getting the skills to pay the bills and now you’re ready to prove yourself in your new job.
You’re definitely excited. And you should be. Being a developer is awesome. But with that excitement, it’s also normal to be feeling a bit nervous. My first week as a developer was pretty hectic. My first day, I was given a 200 line SQL query to try to make sense of… I still have flashbacks from that. …
Have you heard of that little programming language called TypeScript? You know, the one that Microsoft made? The one that’s kinda blowing up?
Maybe you caved at some point…