Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Lighthouseを使った認証必須のGraphQL API / GraphQL API au...
Search
shike
February 16, 2019
Programming
0
2k
Lighthouseを使った認証必須のGraphQL API / GraphQL API authentication with Lighthouse
2/16 Laravel JP ConferenceでLTを行った際のスライドです。
shike
February 16, 2019
Tweet
Share
More Decks by shike
See All by shike
Code Generatorを作ってコンポーネントを自動生成しよう / Let's make code generator
shike0909
1
2.2k
TypeScript + GASでAPIを作る / Build API with TypeScript and GAS
shike0909
0
140
Nuxt + TypeScriptで SPAを作る / Build SPA with Nuxt and TypeScript
shike0909
0
120
Reduxについて / Redux introduction and TODO example with Redux
shike0909
0
90
Other Decks in Programming
See All in Programming
Amazon Neptuneで始めてみるグラフDB-OpenSearchによるグラフの全文検索-
satoshi256kbyte
3
150
4年間変わらなかった YOUTRUSTのアーキテクチャ
daiki1003
2
710
破壊せよ!データ破壊駆動で考えるドメインモデリング / data-destroy-driven
minodriven
4
430
Debugging: A Few Things You Should Know
jmatsu
1
140
OpenTelemetryでRailsのパフォーマンス分析を始めてみよう(KoR2024)
ymtdzzz
1
240
offers_20241022_imakiire.pdf
imakurusu
1
140
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
seike460
PRO
2
240
cgroup v2 support in Kubeadm
kentatada
0
220
Synchronizationを支える技術
s_shimotori
1
110
CSC305 Lecture 09
javiergs
PRO
0
120
モジュラモノリス、その前に / Modular monolith, before that
euglena1215
8
750
デバッグの話 / Debugging for Beginners
kaityo256
PRO
8
740
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Bash Introduction
62gerente
608
210k
Done Done
chrislema
181
16k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Typedesign – Prime Four
hannesfritz
39
2.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
31
1.7k
The Art of Programming - Codeland 2020
erikaheidi
51
13k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
4.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
106
49k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Transcript
Lighthouseを使った 認証必須のGraphQL API
柴山健吾 株式会社 ・ チーム : 業務: プライベート:
弊社サービス
お話しすること • とは? • での認証をどうするか
Lighthouseとは?
Lighthouse • から エンドポイントを提供するためのライ ブラリ • ファースト • に を定義することで簡単に使える
• が に接続してよしなにやってくれる • を使ったカスタマイズも簡単
の
Lighthouseでの認証
実際に使うとなると 認証が必要なケースが ほとんどでは?
Lighthouseでの認証 • 「 」を使う • の をそのまま使える • の指定の仕方は と同じ
• 複数の を組み合わせることもできる
の
middleware 「auth:api」 • でデフォルトで用意されている • テーブルの カラムとリクエストヘッダー の の値を元に認証を実施
テーブルの定義
None
テンプレート
を使う場合
別の方法(試してません) • 「 」を使う • でデフォルトで使用する を設定する
None
None
まとめ • で簡単に エンドポイントを作成でき る • 超便利 • 認証機能もサクッと作れる •
もっと使いこなしたい
ご清聴ありがとうございました