graphql / graphql/graphql.github.io

Schema Design: Use triple quotes for descriptions

Đang mở
#2,355 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
889
Fork
1.5k
Merge trung bình
4 ngày 12 giờ
Pull request đã merge (30 ngày)
21

Mô tả

Use triple-quote syntax (`"""description"""`) for field and type documentation, not `#` symbols.

Rationale: Triple quotes are parsed as descriptions and appear in introspection and documentation tools. Hash comments are ignored by the parser and invisible to consumers.

**Example:**

Prefer:
```
"""
The business name
"""
name: String
```

Not:
```
# The business name
name: String
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.