graphql-engine/metadata-api-types/typescript
Jesse Hallett 885681da9a server: commit Metadata OpenAPI spec with CI check, add Typescript client scaffolding
## Description

Adds `metadata.openapi.json` to version control. Adds a Buildkite job that verifies the spec is up-to-date on server changes, and fails the CI pipeline if not.

Adds scaffolding for a new Typescript project that consumes that OpenAPI spec, and produces Typescript types. This is adapted from the similar existing data connectors project in `dc-agents/dc-api-types/`. Generated code is *not* committed to version control. Instead there is a script to generate code on-demand at publishing time. There are plans to incorporate publishing the generated project to NPM using a forthcoming pipeline that the Console team is working on.

For the moment the Typescript project is under `metadata-api-types/typescript/`. The plan is to move the project in a future PR to the frontend sub-monorepo.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7525
GitOrigin-RevId: dc27a807e52af117636f3aa6c2c289a0be87ade1
2023-02-15 18:38:38 +00:00
..
patches server: commit Metadata OpenAPI spec with CI check, add Typescript client scaffolding 2023-02-15 18:38:38 +00:00
.gitignore server: commit Metadata OpenAPI spec with CI check, add Typescript client scaffolding 2023-02-15 18:38:38 +00:00
.npmrc server: commit Metadata OpenAPI spec with CI check, add Typescript client scaffolding 2023-02-15 18:38:38 +00:00
.nvmrc server: commit Metadata OpenAPI spec with CI check, add Typescript client scaffolding 2023-02-15 18:38:38 +00:00
package-lock.json server: commit Metadata OpenAPI spec with CI check, add Typescript client scaffolding 2023-02-15 18:38:38 +00:00
package.json server: commit Metadata OpenAPI spec with CI check, add Typescript client scaffolding 2023-02-15 18:38:38 +00:00
README.md server: commit Metadata OpenAPI spec with CI check, add Typescript client scaffolding 2023-02-15 18:38:38 +00:00
tsconfig.json server: commit Metadata OpenAPI spec with CI check, add Typescript client scaffolding 2023-02-15 18:38:38 +00:00

Hasura GraphQL Engine Metadata API Types

This package contains TypeScript types for working with the Hasura GraphQL Engine Metadata API. That is the API that is used to configure the GraphQL Engine.

Currently this library exports types used for exporting and importing GraphQL Engine metadata in its entirety. To get the root type for exported metadata, import the MetadataV3 type.

import type { MetadataV3 } from '@hasura/metadata-api'

The other types provided by the library are aliases for types of properties that appear within the metadata export.