in GraphQL • Define schema first, next implement based on schema # Book type Book { # what is book ... } type Query { # returns book list books: [Book]! }
Until then • Gateway provides REST API - built in 2010 before Swagger1 • API documentation outside of code • Develop with mocking REST API or implement server first 1 https://github.com/swagger-api/swagger-core
Struggled at the beginning • Schema was defined but... • Client made client-specific mock(not apollo) because of server's mock returned less patterns of data • Insufficient disucussion about schema
Improved for each Scrum's iteration • Schema and mock was defined before each development • Defined schema first helped to our team's resource balance(I think it leads more flexibility about team members role)
Update documentation with code after GraphQL • Ensure schema and code are same • Cons: comments are not required type Query { # returns book list books: [Book]! }
Easy to disucuss about schema and query • from client and server perspectives • at review time on GitLab • chatting based on query • SDL(Schema Definition Language) formatted documentation