You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
こんにちは, メディア開発部の今村です. この記事はGunosy Advent Calendar 2021の23日目の記事です. 昨日の記事は洪さんの「Swift Concurrencyの気になるところ」でした. グノシーの社内管理画面用APIはGo + GraphQLで作っており, ライブラリはgqlgenを使っています. 開発開始からある程度経って使い方も固まってきたので, この記事ではgqlgenをどのように使っているかを紹介します. (主旨は事例紹介なのですが, 記事を書いていて「あまりメジャーな使い方じゃないしもっといい方法もあるな...」という気持ちになったのでこんなタイトルになっています. 詳しくは後半に書きました.) gqlgenの紹介 プロジェクトの構成 resolverとdomain serviceの依存関係 リクエスト次第で不要な処理を飛ばす 型変換にFOPを使う そ
こんにちは。宿泊事業本部の宇都宮です。この記事では、GraphQLをベースに、GoとTypeScriptでスキーマを共有しながら開発を進める方法について紹介します。 この記事は 一休.com Advent Calendar 2019 の16日目の記事です。 GraphQLとは ライブラリの選定 コードファースト vs スキーマファースト Goによるサーバ実装 TypeScriptによるクライアント実装 おわりに 参考文献 GraphQLとは GraphQLは、Facebookによって開発された、Web APIのための クエリ言語 です。その特徴もSQLに似ていて、データの取得や更新を宣言的な記述によって行うことが出来ます。 仕様は公開されており、リファレンス実装として graphql-js がありますが、それ以外にも様々な言語でGraphQLサーバを実装できます。 GraphQLでは以下の
Logo from graph-gophersIn the beginning: Apollo ServerWhen it comes to building a graphQL server, almost everyone looks to Apollo Server; we were no different. Apollo allowed us to get a graphQL server up and running really quickly. We loved being able to return mock data almost instantly to our mobile/frontend engineers. Our graphQL server began to growAt SafetyCulture we have a microservice arch
This article shows how to build a simple real-time chat using GraphQL and Go. The GraphQL server is implemented with vektah/gqlgen package and uses Redis to store the state. The front-end app is made with Vue and uses Apollo client libraries to communicate with the server. Full source code is available on GitHub. Getting started Set up Docker and Docker Compose. You also need Go with vgo and vekta
A few months ago, a really nice Go package vektah/gqlgen for GraphQL became popular. This article describes how GraphQL is implemented in "Spidey", an exemplary microservices based online store. Some parts listed below are missing, but complete source code is available on GitHub. Architecture Spidey encompasses three services that are exposed to the user through a GraphQL gateway. Communication wi
このあいだ GitHub が公開していた GraphQL API が便利そうだったので使おうと思ったのだけど、求めたライブラリがなかったので作った次第です。 ここで GraphQL についての説明はしませんが、結果の JSON とクエリが同じ形を持っているのが便利で美しいですね。ということは API の結果の JSON を受け取る struct から GraphQL のクエリが生成できるのが自然でしょう。そういうことをやってくれるシンプルなライブラリです。 GitHub - motemen/go-graphql-query API シンプルな例 ディレクティブとエイリアス 引数と変数 インラインフラグメント 複雑な例 軽い気持ちで書きはじめたところ GraphQL に予想外の表現力があることがわかったのでけっこう無理をしているところもあります。一般的にどんな使い方がなされるのかわかってない
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く