はじめに 現在携わっているプロジェクトの技術選定で GraphQL を使うことになり、 GraphQL クライアントとして Apollo Client を採用することになりました。 最初は GraphQL をクライアントサイドで便利に使えるようにしてくれるものくらいの認識で、クライアント側の状態管理には別途 Redux とか入れるのかなと思っていたのですが、調査の過程でたまたま Apollo Client は Redux を置き換えるとの記事を見かけたので Apollo Client のキャッシュの仕組みと状態管理について少し調べてみました。 この記事では下記のことについて解説します。 Apollo Client とは Apollo Client のキャッシュの仕組み Reactive variables を利用したローカルの状態管理について かなり内容がもりもりになってしまったのですが、
Are you looking for an Open Source Graph Manager? Cosmo is the most complete solution including Schema Registry, Router, Studio, Metrics, Analytics, Distributed Tracing, Breaking Change detection and more. I think GraphQL will change the world. There will be a future where you can query any system in the world using GraphQL. I'm building this future. So why would I argue against using GraphQL? My
LogRocket’s Galileo AI watches every session, surfacing impactful user struggle and key behavior patterns. Without a doubt, one of the best features of GraphQL is its awesome type system. Together with tools like the GraphQL Code Generator and typed Javascript subsets like TypeScript or Flow, you can generate fully typed data fetching code within seconds. I cannot think back to the time where I ha
December 14, 2020 Nexus 1.0: A Major Release for Type-Safe, Code-First GraphQL APIs Prisma is a core contributor to Nexus, a library for building code-first and type-safe GraphQL APIs. Nexus has just reached 1.0. In this post, we'll recap what Nexus is and the value it brings and what's new at 1.0. Nexus is a library originally authored by Tim Griesser that allows developers to build code-first an
Earlier this week I released GraphQL Helix, a new JavaScript library that lets you take charge of your GraphQL server implementation. There's a couple of factors that pushed me to roll my own GraphQL server library: I wanted to use bleeding-edge GraphQL features like @defer, @stream and @live directives. I wanted to make sure I wasn't tied down to a specific framework or runtime environment. I wan
Wantedly でバックエンドエンジニアをしている @izumin5210 です。 この記事は GraphQL Advent Calendar 2020 の11日目の記事として書かれました。が、7割くらいは SSR についての議論のこり3割くらいが Apollo Client の話です。 最近、Apollo Client と SSR(Server Side Rendering) を利用した Web アプリケーションのパフォーマンス改善に取り組みました。この記事では「パフォーマンスの問題にどう立ち向かったか」および「そもそも問題を起こさない構造にするために何ができるか・何をすべきでないか」の考察をしていきます。 TL;DRパフォーマンス改善は計測・可視化からライブラリが用意してくれているフック機構を上手に使って計測していこうrenderToStringWithData では、renderT
この記事は GraphQL Advent Calendar 2020 10 日目の記事です。 前回の記事は @mtsmfm さんの Swift 用 graphql-codegen plugin の graphql-codegen-swift-operations を作った でした。 はじめに PrismaはGraphQLを実装するためのクライアントライブラリ,ORM(Prisma1においてはGraphQLサーバ自体も含む)として広く知られていると思いますが、Prismaはversion2(以下、ただのPrismaと書いている箇所はPrisma2を指します)より、ORM部分に注力し、GraphQLとは直接関係ない方向に成長していく方向に舵を取っています。 (参考: https://www.prisma.io/blog/prisma-2-is-coming-soon-mwwfhevie993)
Rob Richard and Liliana Matos are front-end engineers at 1stDibs.com. They have been working with the GraphQL Working Group as champions of the @defer and @stream directives. The @defer and @stream directives have been a much anticipated set of features ever since Lee Byron first talked about it at GraphQL Europe 2016. For most of 2020, we have been working with the GraphQL Working Group to standa
この記事は GraphQL Advent Calendar 2020 6日目の記事です。 前回の記事は @fossamagna さんの AppSyncのGraphQL APIを@apollo/clientで呼び出す でした。 この記事では以下の記事で紹介されているGraphQLのエラーハンドリングの手法についての紹介と、それを利用するクライアントサイドのメリットについての考察をしていきます。 sachee.medium.com アプリケーションで生じる様々なエラーと、GraphQLの一般的なハンドリング GraphQLはリクエストに対してエラーが発生した場合、一般的にレスポンス中のerrorsというキーの中にそのエラーに関する情報を詰め込んだレスポンスを返すというプラクティスがあります。 "errors": [ { "message": "....", "locations": [ ...
この記事は GraphQL Advent Calendar 2020 4日目の記事です。 前回の記事は @qsona さんの 動的型付け言語での GraphQL Client でした。 題の通り、Shopify/graphql-batch がどのようにリクエストを batching するのかをコードを読みつつ追っていきます。 時間の都合で、この記事ではシンプルな単一の Query のみ(Mutation でない)を実行した場合を対象とします。また Loader については README に記載されている RecordLoader の実装をそのまま使います。 3行まとめ graphql-ruby の lazy-loading class として Promise を使う Loader.for(Klass).load(object.klass_id) が呼ばれるたびに Loader に Prom
From graphql.orgThis post is the first part of a series of best practices and observations we have made while building GraphQL APIs at PayPal. In upcoming posts, we’ll share our thoughts on: schema design, error handling, production visibility, optimizing client-side integrations and tooling for teams. You might have seen our previous post “GraphQL: A success story for PayPal Checkout” about PayPa
https://www.graphql-mesh.com GraphQL Mesh allows you to use GraphQL query language to access data in remote APIs that don't run GraphQL (and also ones that do run GraphQL). It can be used as a gateway to other services or run as a local GraphQL schema that aggregates data from remote APIs. The goal of GraphQL Mesh is to let developers easily access services that are written in other APIs specs (su
エンジニアリンググループの冨岡 (@jooohn) です。出張でNYにきています。NYへの出張は二度目なのですが、同僚のChris (彼はUK, JP, USと三カ国のM3を渡り歩いています!) とWashington, D.C.にいくなどして休日も満喫しています。 バーガーは野菜 Washington, D.C. にて。NYCからバスで4hほどでいける。 現在はM3 USAが運営するニュースサイトMDLinxのリニューアルプロジェクトに関わっています。そこで利用しているGraphQL (Apollo) の活用事例を紹介します。 新しいMDLinx の構成 新しいMDLinxでは上図のように、k8sクラスタ内にいくつかのサービスが存在するマイクロサービス構成になっています。各サービスではGraphQLを共通のインターフェースとして利用しており、webhook用のエンドポイントなどの特殊な場
毎日朝7時更新/プログラミング芸人/WEBデザイン/フォトグラファー/インド/JavaScript芸人/Reactエンジニア
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く