サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
Pixel 9
www.apollographql.com
Most articles explaining the benefits of GraphQL focus on advantages for the frontend: things like preventing overfetching, reducing round trips, and iterating faster. But GraphQL provides just as many advantages for backend developers, which is why I choose it by default for new APIs and why you should consider it, too. Improved communication The goal of building any API is to enable someone to u
Blog /announcement /Frontend /Using Apollo Client with Next.js 13: releasing an official library to support the App Router Back to Blog May 10, 2023Using Apollo Client with Next.js 13: releasing an official library to support the App Router The latest release of Next.js 13 (13.4) declared the new app directory as stable and it will now be the default for new projects. The app directory is a major
May 18, 2022The supergraph: a new way to think about GraphQL We’ve had a busy month at Apollo. Over the last several weeks we’ve released some significant updates to the Apollo stack. Last month we shipped Federation 2, a sophisticated and more flexible approach to GraphQL composition. And last week we made Contracts generally available, a way to tailor your graph to specific use cases like mobile
November 10, 2021Apollo Router: our GraphQL Federation runtime in Rust At Apollo, we help developers power the world’s most important applications with a graph. Whether you’re shopping online, booking travel, or binge-watching your favorite movies, you’re using the graph every day. These experiences are all built on Apollo Federation, an architecture for declaratively composing GraphQL APIs into a
November 3, 2021Moving Apollo Federation 2 to the Elastic License v2 Today, we are introducing Apollo Federation 2, a major update to our graph composition technology that lets developers build and evolve a unified graph in a modular, principled way. Federation 2 is a new implementation of our query planner and execution gateway that introduces a more flexible model for how types and fields compos
Blog /GraphQL /Security /9 Ways To Secure your GraphQL API — GraphQL Security Checklist Back to Blog May 26, 20219 Ways To Secure your GraphQL API — GraphQL Security Checklist So you’ve built out your GraphQL API, and you’re nearly ready to deploy it to production. Fantastic. Let’s talk security: a significant part of every stable application on the internet. It’s worth taking some time to mitigat
This is a guest post by James Mortemore, who is a software engineer at YLD. He has an extensive background in API development & enterprise integration architecture. Out of the box, GraphQL supports validating your inputs based on type information. For example, you can ensure that an argument is a particular scalar type, such as String or Int. You can also enforce the shape of object arguments usin
We recommend reading Core pagination API before learning about considerations specific to cursor-based pagination. Using list element IDs as cursorsSince numeric offsets within paginated lists can be unreliable, a common improvement is to identify the beginning of a page using some unique identifier that belongs to each element of the list. If the list represents a set of elements without duplicat
Automatic persisted queriesImprove network performance by sending smaller requests Clients send queries to Apollo Server as HTTP requests that include the GraphQL string of the query to execute. Depending on your graph's schema, the size of a valid query string might be arbitrarily large. As query strings become larger, increased latency and network usage can noticeably degrade client performance.
Blog /tooling /Apollo Codegen /TypeScript GraphQL Code Generator – Generate GraphQL Types with Apollo Codegen Tutorial Back to Blog April 1, 2021TypeScript GraphQL Code Generator – Generate GraphQL Types with Apollo Codegen Tutorial Don Norman, the author of “The Design of Everyday Things” has a philosophy for what he believes constitutes good design. Don says that good design is primarily discove
March 9, 2021Getting Started With Apollo Client in Next.js (Update May 2023) We published a library that makes it easier to use Apollo Client with Next.js 13, this guide still remains valid if you’re using the pages directory. Wait, you want me to put my data where!? Figuring out how to configure Apollo Client with Next.js can be a bit confusing. This confusion stems from the fact that there are t
The GraphQL specification includes default scalar types Int, Float, String, Boolean, and ID. Although these scalars cover the majority of use cases, some applications need to support other atomic data types (such as Date) or add validation to an existing type. To enable this, you can define custom scalar types. Defining a custom scalarTo define a custom scalar, add it to your schema like so:
Reactive variablesState containers integrated into Apollo Client's reactivity model New in Apollo Client 3, reactive variables are a useful mechanism for representing local state outside of the Apollo Client cache. Because they're separate from the cache, reactive variables can store data of any type and structure, and you can interact with them anywhere in your application without using GraphQL s
January 29, 2021Redux to Apollo: Data Access Patterns As part of NerdWallet’s migration from our React-Redux code base to client state management using Apollo, we’ve been exploring how to effectively implement data access patterns, side-effects handling, and other aspects of client state management using GraphQL and Apollo Client. This first post examines how we accomplish effective data access, f
GraphQL TutorialsBoost your developer skills with our hands-on GraphQL tutorials and trainings
This tutorial helps you: Obtain a basic understanding of GraphQL principlesDefine a GraphQL schema that represents the structure of your data setRun an instance of Apollo Server that lets you execute queries against your schemaThis tutorial assumes that you are familiar with the command line and JavaScript and have installed a recent Node.js (v14.16.0+) version. Additionally, for those interested,
Introduction to Apollo FederationLearn how to combine your GraphQL APIs into a unified supergraph What is Apollo Federation?Apollo Federation lets you declaratively combine multiple GraphQL APIs into a single, federated graph. This federated graph enables clients to interact with multiple APIs through a single request. A client makes a request to the single entry point of the federated graph calle
Apollo Client has a particularly challenging responsibility: to make interconnected GraphQL data easy to use on the client-side. In most rich client applications, we need the ability to cache data and pass it to components. We also need to know when to re-fetch data vs. when to return what’s already cached; this helps to avoid making unnecessary network requests. This kind of caching logic can be
Before there was GraphQL, there was REST. In recent years, REST has become the dominant API style for building backend web services. With REST, you could signal the type of request we want to make (ex: GET, POST, PUT, or DELETE) and the resource we’d like to fetch or interact with (ex: /api/pets/1) using an HTTP method and a URL. It’s a great approach (and one we initially used at StockX for sever
If your graph includes thousands or millions of books, this query probably returns much more data than you need. To resolve this issue, GraphQL servers can paginate their list fields. When a client queries a paginated list field, the server returns only a portion (or "page") of the list's elements. The client's query includes arguments that indicate which page the server should return: GraphQL ser
Hello! 👋 This short tutorial gets you up and running with Apollo Client. Step 1: SetupTo start this tutorial, do one of the following: Create a new React project locally with Vite, orCreate a new React sandbox on CodeSandbox.Step 2: Install dependenciesApplications that use Apollo Client require two top-level dependencies: @apollo/client: This single package contains virtually everything you need
July 14, 2020Announcing the Release of Apollo Client 3.0 Today we’re thrilled to announce the official release of Apollo Client 3.0! This release is the culmination of 55 betas, 14 release candidates, and hundreds of resolved issues and merged pull requests over the past eleven months. Phew! To everyone who’s tried out AC3 during this extended beta period, thank you. We couldn’t have reached this
Mutations in Apollo ClientModify data with the useMutation hook Now that we've learned how to query data from our backend with Apollo Client, the natural next step is to learn how to modify back-end data with mutations. This article demonstrates how to send updates to your GraphQL server with the useMutation hook. You'll also learn how to update the Apollo Client cache after executing a mutation,
Optimistic mutation resultsUpdate your UI before your server responds It's often possible to predict the most likely result of a mutation before your GraphQL server returns it. Apollo Client can use this "most likely result" to update your UI optimistically, making your app feel more responsive to the user. For example, let's say we have a blog application that supports the following mutation:
You don’t need anything fancy to load some data from a GraphQL server. All you need for a basic client is a POST request that sends a query down to the server and gets a result back. However, GraphQL queries include a lot of useful information that can be used to make your application faster and more efficient. This is why we have smart client implementations, such as Apollo Client and Relay, that
New to Apollo? We recommend checking out our introductory Lift-off series, which introduces many of the same concepts as this tutorial with helpful videos and interactive code challenges along the way. Completing the Lift-off series will also grant you the Apollo Graph Developer - Associate Certification, letting you easily share your newfound skills with the world! If you are familiar with Apollo
March 13, 2020First Impressions with Apollo Client 3 I’ve been using the Apollo platform for almost two years now. I’ve used it on several commercial applications, and it’s become one of my all-time favorite frameworks. With the upcoming release of Apollo Client 3, I thought it would be an excellent time to test out the latest beta and write about some of the exciting improvements I’m most excited
Error handlingMaking errors actionable on the client and server Apollo Server v4 introduced a regression where providing invalid variables yields a 200 status code instead of 400. To mitigate this regression, provide the status400ForVariableCoercionErrors: true option to your ApolloServer constructor. For more information, see the migration guide. Whenever Apollo Server encounters errors while pro
Unless all of the data you are loading is completely public, your app has some sort of users, accounts and permissions systems. If different users have different permissions in your application, then you need a way to tell the server which user is associated with each request. Apollo Client uses the ultra flexible Apollo Link that includes several options for authentication. CookieIf your app is b
次のページ
このページを最初にブックマークしてみませんか?
『Streamlining APIs, Databases, & Microservices | Apollo GraphQL』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く