📝

파일 네이밍 컨벤션

공통

예외적으로 명시하지 않는 한 camelCase를 따른다.

Action 종류

  • 읽기 / 조회 - Get (컴포넌트에서는 사용할 일 X, GQL에서는 Query 네이밍 컨벤션 참고)
  • 생성 / 추가 - Create
  • 삭제 / 제거 - Delete
  • 수정 / 변경 - Update
  • 확인 - Check

React 컴포넌트

PascalCase를 기본으로 한다.

구성 요소

  • suffix (앱 프로젝트에서 *Component, *Container, *Screen, *Form, *Cell 등)
  • scope (MyHealth 폴더 내에서 MyHealth* 와 같이 붙는 것)
  • verb(action) (Create, Edit 등)
  • noun-like (BodyCondition, Password, Register 등 명사처럼 쓰이는 것)
💡
scope - verb(action) - noun-like - suffix (ex: DestinationCreateForm, ProfileUpdatePasswordFormComponent)

Graphql 파일

camelCase를 기본으로 한다.

Query

단, Query suffix는 파일 내 쿼리 이름에서 제거한다.
엔티티의 정보를 불러오기만 할 때
💡
[entity]Query.graphql 단, Query suffix는 파일 내 쿼리 이름에서 제거한다. (ex: productQuery.graphql)
검증 / 확인 과 같이 엔티티의 정보를 불러오는 동작이 아닌 추가적인 Action일 때
💡
action-entity[Query].graphgql (ex: checkPinCodeQuery.graphql)

Mutation

상단에 정의한 Action을 참고하여 A/HC/LC 패턴을 따른다.
  • prefix는 CRUD를 베이스로 한다.
💡
prefix?-Action-High Context - Low Context (ex: createDestination.graphql)

함수 파일