Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

GraphQL Server - Single point of opportunities

SWOT Analysis on GraphQL @ GraphQL Day Bodensee, 6th September 2019

  • Be the first to comment

  • Be the first to like this

GraphQL Server - Single point of opportunities

  1. 1. GraphQL Server - Single Point of Opportunities Tobias Meixner @ GraphQL Day Bodensee www.brikl.io
  2. 2. 3 Facts Vivid Twitter Reader & Retweeter German citizen prev. ice speed skater & a lot of engineers...
  3. 3. Let's talk GraphQL! GraphQL Bangkok GraphQL Asia GraphQL Hong Kong
  4. 4. GraphQL Servers The good, the bad and the?
  5. 5. SWOT for GraphQL Strengths are internal, positive attributes of your company. These are things that are within your control. Strength Weaknesses are negative factors that detract from your strengths. These are things that you might need to improve on to be competitive. Weakness Opportunities are external factors in your business environment that are likely to contribute to your success. Opportunity Threats are external factors that you have no control over. You may want to consider putting in place contingency plans for dealing them if they occur. Threat
  6. 6. Note! Baised towards GraphQL Not scientific Mostly JS related
  7. 7. Strength What is good about GraphQL Servers?
  8. 8. Empower the client/frontend Contract between frontend and backend Client will define shape of data rather than backend High developer velocity Data-driven development helps to speed up frontend development significantly Optimized fetching Reduce network round-trips Reduce payload size Strength
  9. 9. Weakness What are the negative sides of using GraphQL Servers?
  10. 10. High learning curve Can be overwhelming to get started as a new technology N+1 Overzealous database calls and waste of resources with duplicate requests Caching Challenging to achieve on the gateway level due to complexity and variety of client requests Weakness
  11. 11. Threats What poses a danger using GraphQL?
  12. 12. Missing eco-system GraphQL great for internal development but not as public API just yet Ethical implications Consider the effect of picking GraphQL and a vendor Vendor-lock in Hard to combine or have GraphQL vendors to interact - danger of locked-in Threats
  13. 13. Opportunity What can you achieve with GraphQL?
  14. 14. Type-Safety GraphQL Schema as universal type definition in client and server side Growing community Getting larger by the day Great developer experience Fantastic experience especially for frontend developers Opportunity
  15. 15. What can you do with GraphQL?
  16. 16. End-To-End Testing Full end-to-end testing using benefits of frontend - backend contract - refer to the talk of Robert Dickert: https://www.youtube.com/watch?v=3Bpdh5j05r8 Testing
  17. 17. Resolve types in mutations Use mutation payloads to perform integration testing
  18. 18. Replace refetch You can replace refetch using returning types updating your normalized cache Payload as cache update
  19. 19. Return meta data Use mutation payloads to return meta data, error handling Payload and error handling
  20. 20. Return meta data Use mutation payloads to return meta data, error handling Payload and error handling
  21. 21. Insights Tracing Get fine grained insights on usages in your apps for client usage, query metrics and its traces
  22. 22. Tracing of fields and type resolvers Powerful insights
  23. 23. Beyond tracing time Complexity Payload size Query history Public facing APIs could charge customers by actual usage based on complexity of a GraphQL query rather than charging by no. of API calls Fine-grained tracing also enables highly personalized results or usage profiles by user
  24. 24. Auto- Indexing Adjust to the client needs and preferences Knowing request patterns and tracing down to the field level you are able to index and adjust usage down to the data layer.
  25. 25. Single point of opportunity but...
  26. 26. Over- ambitious GraphQL GraphQL as Gateway https://medium.com/@__xuorig__/the-rise-of- graphql-overambitious-api-gateways- 2c6f054e80a1
  27. 27. Example 1: Authorization Authenticate in the gateway Authorize in the service e
  28. 28. Don't sell or try to use GraphQL as silver bullet Be mindful of GraphQL weaknesses Use an opinionated GQL server if it fits your use-case
  29. 29. Thank you! meixnertobias

×