prismicio / prismic-types

Type definitions for Prismic content, models, and APIs
https://prismic.io/docs/technologies/javascript
Apache License 2.0
11 stars 4 forks source link

docs: add graphql and document field TSDocs #12

Closed dayhaysoos closed 3 years ago

dayhaysoos commented 3 years ago

Filled in comments for graphql types (just copy/pasted comments from non-graphql fields.ts

angeloashmore commented 3 years ago

Looks good! We just need comments on the other DocumentHeader fields:

    id: string;
    uid: string | null;
    url: string | null;
    type: TypeEnum;
    href: string;
    tags: string[];
    slugs: string[];
    linked_documents: unknown[]; // TODO: Not sure of the type for this one
    lang: LangEnum;
    alternate_languages: AlternateLanguage<TypeEnum, LangEnum>[];

Each of these should have a short description. For example:

They can be really simple explanations unless more detail is needed. "A list of alternate languages," for example, does not give enough context around what an "alternate language" is.