Upgrade to Pro — share decks privately, control downloads, hide ads and more …

GraphQLを_Rubyで気軽に試す.pdf

Hiroto Fukui
August 31, 2018
240

 GraphQLを_Rubyで気軽に試す.pdf

Hiroto Fukui

August 31, 2018
Tweet

Transcript

  1. Who

  2. Who

  3. Who

  4. Who

  5. Who

  6. Who

  7. • What • Why • History • Req & Res

    Example • What's special? ◦ Type ◦ Introspection • Demo • Challenges
  8. History • 2012 - Facebookが内部向けに開発 • 2015 - 仕様がRFCとして公開される •

    2015 - React Europeでお披露目される • 2018 - Working Draft
  9. Client Server /dog name, color, weight, ... DogType ToyType OwnerType

    FoodType name, category, ... name, gender, ... name, ingredient, ...
  10. POST http://.../graphql { IntrospectionQuery: { ... } } { "Dog":

    { "name": "String", "weight": "Float", "color": "String", ... } "Owner": { name: "String", dogs: ["Dog"] } }
  11. # Response { "errors": [ { "message": "Argument 'dogId' on

    Field 'dog' has an invalid value. Expected type 'Int!'.", "locations": [{ "line": 2, "column": 2} ], "fields": [ "query", "dog", "dogId" ] } ] }