Version 19.0.0 ReleaseNotes Relay 19.0.0 includes many documementation improvements, bug fixes, and improved capabilities. @alias required on conditional fragments To improve type safety, the @alias directive is now required on all fragments that are only conditionally fetched either due to @skip/@include or fragment type conditions which only conditionally match. You can opt out of this validati
Major Changes #12384 6aa6fd3 Thanks @jerelmiller! - Remove the asyncMap utility function. Instead use one of the RxJS operators thatcreatesObservables from promises, such as from. #12398 8cf5077 Thanks @jerelmiller! - Removes the isApolloError utility function to check if theerror object is anApolloError instance. Use instanceof to check for more specificerror types that replaceApolloError.
はじめにGraphQLは、API開発において柔軟性と効率性を提供する強力なツールです。しかし、クエリの記述が自由な分、クライアント側で不用意に多くのフィールドを要求してしまうと、パフォーマンス低下や保守性の悪化につながる可能性があります🥲本記事では、TypeScript Language Service Pluginの1つであるGraphQLSPを活用し、GraphQLクエリの"ダイエット"、つまり未使用フィールドの削減を実現する方法を紹介します。 ※ この記事はTSKaigi Kansai 2024で共有した内容を記事にしたものです。GraphQLの課題と対策 over fetching問題GraphQLは、クライアントが厳密に必要とするデータのみを要求できるため、RESTAPIに比べてオーバーフェッチによるパフォーマンス低下を抑えることができます✊しかし、GraphQLでも
gql.tada is aGraphQL document authoring library, inferring the result and variables types ofGraphQL queries and fragments in theTypeScript type system.It derives the types for yourGraphQL queries on the fly allowing you to write type-safeGraphQL documents quickly. In short, gql.tada, parses yourGraphQL documents in theTypeScript type systemuses your introspected schema andscalar configura
こんにちは。ファンと共に時代を進める、Web3スタートアップのGaudiyでエンジニアをしているkodai(@r34b26)です。 Gaudiyでは、以前からフロントエンド(Next.js)とGateway(Node.js)の通信においてGraphQLを使用しています。techblog.gaudiy.com その際に、GraphQLスキーマからコードを自動生成するツールとしてGraphQL-Codegenを活用してきましたが、開発者体験やユーザー体験においていくつかの課題を抱えていたため、今回、gql.tadaに移行しました。 この記事では、課題背景から実際の移行プロセスを紹介してみるので、gql.tadaが気になっている人やGraphQLの運用に課題感のある人の参考になれば嬉しいです。 1. GaudiyとGraphQL 2.GraphQL-Codegenにまつわる課題 3. gql
Use trusted documents if yourGraphQLAPI is only for your own apps (mostGraphQLAPIs!) for a massively decreased attack-surface, increased performance, and decreasedbandwidthusage. At appbuild time, extract theGraphQL documents (queries, mutations, subscriptions) and make them available to the server. At run time, send documentId instead of the whole document; only acceptrequests with a doc
Cloudflare PagesのサイトをNotebookLMから読みやすくするCloudflare Meet-up Tokyo Vol.7
Apollo Client 3.8 から useFragment というReact hook が導入されました。 今回はこの useFragment を利用している Component を対象としたテストやStorybook の書き方についての覚書です。 先日に別のエンジニアから、Storybook の記述に際して相談を受けた際のやり取りを元ネタとしています。 なお、途中のコードが長くなりそうなため、先に記事で取り扱いたいトピックを挙げておきます。 useFragment を利用している Component のStorybook が記述できるようになることStorybook で扱う Fragment のスタブデータの構築に一定の柔軟性を持たせること各トピックに対応する解として、この記事では以下の方式について解説します。Apollo Cache を用意し、Story 描画前に所望の状
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く