Slackbot
09/28/2020, 4:13 AMHyeseong Kim
09/28/2020, 4:16 AMzao
09/28/2020, 4:42 AMHyeseong Kim
09/28/2020, 5:31 AMinterface PetInfo
type DogInfo implements PetInfo
type CatInfo implements PetInfo
만 하셔도 쿼리는
query Pets {
pets(filter: { state: { ... } }) {
id
...on DogInfo {
# ...
}
...on CatInfo {
# ...
}
}
}
이런식으로 더 깔끔하게 갈라질겁니다.Hyeseong Kim
09/28/2020, 5:32 AMProduct‐centric: GraphQL is unapologetically driven by the requirements of views and the front‐end engineers that write them. GraphQL starts with their way of thinking and requirements and builds the language and runtime necessary to enable that.
Client‐specified queries: Through its type system, a GraphQL server publishes the capabilities that its clients are allowed to consume. It is the client that is responsible for specifying exactly how it will consume those published capabilities. These queries are specified at field‐level granularity. In the majority of client‐server applications written without GraphQL, the server determines the data returned in its various scripted endpoints. A GraphQL query, on the other hand, returns exactly what a client asks for and no more.https://spec.graphql.org/June2018/#sec-Overview 이건 GraphQL 스펙에 명시되어있는 설계 원칙입니다.
백엔드팀에게 개선요청했으나, graphql은 필요한 데이터만 뽑아쓰고, 필터링 할 수 있기때문에 프론트에서 가공하는게 맞다.이런 사고방식은 전반적으로 케이스 스터디 등 학습과정을 통해 개선할 필요가 있을거에요
zao
09/28/2020, 5:36 AMHyeseong Kim
09/28/2020, 5:37 AMHyeseong Kim
09/28/2020, 5:44 AMzao
09/28/2020, 5:59 AM