Skip to content

Auto-generate TypeScript typings #1

Description

@rubensworks

When given a GraphQL-LD query, it should be possible to auto-generate TypeScript typings.

For example:

query MyQuery @single(scope: all) {
  graph
  ... on Collection {
    subset(_:PAGE)
    search @plural {
      template
      variableRepresentation
      mapping @plural {
        variable
        property
      }
    }
  }
}

Example of typings:

interface MyQuery {
  graph: string;
  search: MyQuery_search[];
}
interface MyQuery_search {
  template: string;
  variableRepresentation: string;
  mapping: MyQuery_search_mapping[];
}
interface MyQuery_search_mapping {
  property: string;
  variable: string;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions