Pro Yearly is on sale from $80 to $50! »

GraphQL + Relay + Serverless

3a10bc081242e09952083e4c5dc2fff6?s=47 텀블벅
November 10, 2017

GraphQL + Relay + Serverless

필요한 리소스만을 요청하고 사용하는 API 만들기

3a10bc081242e09952083e4c5dc2fff6?s=128

텀블벅

November 10, 2017
Tweet

Transcript

  1. GraphQL + Relay + Serverless ߅ഋध @ థ࠶ߢ

  2. థ࠶ߢ "#$%&'()*+,-./01234 56

  3. ೙ਃೠ ܻࣗझ݅ਸ ਃ୒ೞҊ ࢎਊೞח API ٜ݅ӝ I

  4. ੢߄ҳפ ੢߄ҳפী׸ӟ࢚ಿ ࢸݺ оѺ ߓ࣠࠺ ߓ࣠઱ࣗ 25,000 12,000 2,500 2,500

    ࢚ಿ
  5. ੢߄ҳפ ੢߄ҳפী׸ӟ࢚ಿ ࢸݺ оѺ ߓ࣠࠺ ߓ࣠઱ࣗ 25,000 12,000 2,500 2,500

    ࢚ಿ ProductList Cart ShippingAddress ProductData ProductData
  6. ProductList Cart ProductData ProductData ShippingAddress /carts/1 /products/1 /products/2 /shippingAddresses/1

  7. /carts/1? fields=products,coupons,shipping_addr esses&products[images, descriptions] /carts/1? fields=products,coupons,shipping_addr esses&products[images[high,low]]&prod ucts[descriptions[reviews, contents]]

  8. /carts_with_products_shipping_address_coupons /carts_with_products_recommendations /carts_with_products_videos /carts_with_products_newsletter_signups /carts_with_products_for_mobile /carts_with_products_for_tablets

  9. None
  10. None
  11. None
  12. None
  13. BFF (soundcloud) Backends for Frontends

  14. None
  15. GraphQL A Query Language for API

  16. { me { name company } }

  17. { me { name: "߅ഋध" company: "థ࠶ߢ" } }

  18. { me { name company hobby } }

  19. { me { name: "߅ഋध" company: "థ࠶ߢ" hobby: "୷ҳ" }

    }
  20. Query REST GET method

  21. REST GET /me { name: "߅ഋध", company: "థ࠶ߢ", hobby: "୷ҳ",

    favoriteColor: "౵ی࢝", country: "؀ೠ޹Ҵ", conference: "playnode 2017", cloudProvider: "IBM", age: "?^^^^", address: "??????????", cardNumber: "@#$D@#$#$%#$FD@#$@#" }
  22. GraphQL { user (id: "1") { name company } }

  23. GraphQL { user { name: "chulsoo" company: "younghee co." }

    }
  24. ProductList Cart ProductData ProductData ShippingAddress /carts/1 /products/1 /products/2 /shippingAddresses/1 REST

  25. ProductList Cart ProductData ProductData ShippingAddress { cart { products {

    imageUrl description price shippingCost } shippingAddress } } POST /graphql GraphQL
  26. None
  27. None
  28. None
  29. None
  30. Type System ⚙⚙⚙

  31. Types type Query { cart: Cart } type Cart {

    products: [Product]! shippingAddress: String! } type Product { imageUrl: String! description: String! price: Int! shippingCost: Int! } { cart { products { imageUrl description price shippingCost } shippingAddress } }
  32. Types type Query { cart: Cart } type Cart {

    products: [Product]! shippingAddress: String! } type Product { imageUrl: String! description: String! price: Int! shippingCost: Int! } { cart { products { imageUrl description price shippingCost } shippingAddress } }
  33. Types type Query { cart: Cart } type Cart {

    products: [Product]! shippingAddress: String! } type Product { imageUrl: String! description: String! price: Int! shippingCost: Int! } { cart { products { imageUrl description price shippingCost } shippingAddress } }
  34. Types type Query { cart: Cart } type Cart {

    products: [Product]! shippingAddress: String! } type Product { imageUrl: String! description: String! price: Int! shippingCost: Int! } { cart { products { imageUrl description price shippingCost } shippingAddress } }
  35. Types type Query { cart: Cart } type Cart {

    products: [Product]! shippingAddress: String! } type Product { imageUrl: String! description: String! price: Int! shippingCost: Int! } { cart { products { imageUrl description price shippingCost } shippingAddress } }
  36. Mutation REST POST/PUT/PATCH/DELETE Method

  37. Mutation mutation { createProduct( input: { description: "ݧ૓ ৩" price:

    50000 } ) } { product { Price } }
  38. ؊ب ݈Ҋ ؏ب ݈Ҋ ٯ ௿ۄ੉঱౟о ਗೞח ч݅ NO

  39. ࠺ऴ ֎౟ਕ௼ ਃ୒ ୭ࣗച R

  40. None
  41. None
  42. Relay

  43. Relay

  44. Relay

  45. Relay

  46. Relay

  47. Relay

  48. Relay

  49. id? GraphQL Relay

  50. id? id GraphQL Relay

  51. GraphQL Relay

  52. GraphQL Relay

  53. GraphQL Relay 1

  54. GraphQL Relay 1 1

  55. None
  56. None
  57. Server

  58. Serverless

  59. f(⚡) Functions ⚡⚡ ⚡⚡

  60. Serverless = function-as-a-service?

  61. Serverless Pattern / Architecture

  62. ࢲߡ ҙܻ੄ ݽٚѦ ௿ۄ਋٘ীѱ ݐӝ੗ ☁ /provisioning, OS patching/upgrading, scaling,

    self-healing, … /
  63. Pricing • IBM Cloud functions • 500ms प೯ • 512MB

    @ 5,000,000 ਃ୒ പࣻ • $14.45
  64. Pricing • प೯ दр ⏰ • ݫݽܻ ࣗ࠺۝ • ਃ୒

    പࣻ ⚡
  65. “ࢲߡ” ৉ೡ੄ ݽٚѦ ௿ۄ਋٘ীѱ ݐӝ੗ ☁ /API Gateway, Message Queue,

    Search, Analytics, Authentication, … /
  66. ੉ “ࢲߡ”ٜਸ ೣࣻ۽ োѾೞ੗ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡

  67. None
  68. GraphQL API Gateway Cart Product Search Message Queue Object Storage

    ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ Email Authentication
  69. GraphQL + Relay + Serverless

  70. tumblbug.workable.com ହઑ੸ੋ दب੄ ӝࣿ੸ ӝ߈ਸ ೣԋ ٜ݅ ࣗ೐౟ਝয ূ૑פযܳ ଺णפ׮.