0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

GraphQLとは (概要)

Last updated at Posted at 2020-07-13

Graph QLとは

  • 単なる仕様群
    • プラットフォームや技術に依存せず利用できる
  • REST APIの課題を解決すべく開発された

Graph QLのメリット

1回の通信で、必要なデータのみ取得できる

- 不要なデータの削減
- 通信回数の削減
    - ユーザ体験が良くなり、売上に繋がる

上記の点でREST APIから乗り換えられている

要求したデータのみ取得

- user_id:5
    - name
    - birthday

関連オブジェクトも取得可能

- user_id:5
    - name
    - birthday
    - Orders
        - order
            - product_name
        - order
            - product_name

解決できるREST APIの課題

1. 不要データの取得を抑えられる

- user_id:5
    - user_name
    - password
    - mail_address
    - created
    - updated
      etc...

2. 何回も問い合わせる必要がなくなる

  • user_idの注文情報を取得 → 商品毎に商品名を問い合わせ

採用事例

  • Facebook
  • Twitter
  • Github
  • New York Times
  • IBM
  • Yelp
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?