GRAPHQL SCHEMA REFERENCE

Your API, mapped with intent.

Explore a workspace schema generated by GraphQL-Markdown for YARD, documented next to the Ruby client that calls it: operations, types, relationships, and ready-to-run examples on one site.

workspace.graphqlSCHEMA
type Project implements Node {
  id: ID!
  name: String!
  status: ProjectStatus!
  owner: User!
}

type Query {
  projects(status: ProjectStatus):
    ProjectConnection!
}

OPERATIONS

Queries, mutations, subscriptions

MODELS

Objects, inputs, unions, enums

RUBY

Client docs linked to the schema

Two references, one site

  • The Ruby client (DemoApi::Client) is documented from its source with YARD tags, like any gem on RubyDoc.info.
  • The GraphQL schema is documented by GraphQL-Markdown: one Markdown page per type and operation, rendered by YARD as extra files next to the Ruby classes.

YARD’s {file:...} links work both ways. DemoApi::Client#projects returns the nodes of a ProjectConnection, and its documentation links to the projects query it sends.

How it is built

  1. npm run generate runs GraphQL-Markdown on the shared demo schema and writes Markdown pages to docs/graphql/.
  2. bundle exec yard doc renders the Ruby sources and the generated pages listed in .yardopts into site/, with the templates in yard/templates/.