A new approach for schema definition is currently in development. Expect this to be simpler in the next few weeks. Feedback welcomed!

The schema exposes functions on your project’s API endpoint. Define your schema in the schema.graphql file in your project.

schema.graphql
directive @hm_function on FIELD_DEFINITION

type Query {
  classifySentiment(text: String!): String! @lambda @hm_function
  classifySeverity(text: String!): String! @lambda @hm_function
}

Hypermode follows GraphQL’s standard definition language. Add your function signature and the directive @lambda @hm_function to register the function on the project’s endpoint. The signature must match the exposed function in your index.ts file.

When deployed, your GraphQL API is available on the /graphql path from your project’s endpoint. The endpoint is visible in the Hypermode Console on the Project Home screen.