Ghostwriter ❤ Tool Integration

Incorporating new components into existing systems is such a pain, this process has been labeled “Integration Hell”. To ease tool integration, Ghostwriter v3.0.0 shipped with a GraphQL API. This API allows outside entities to easily query and manipulate Ghostwriter’s data. In this blogpost, we’ll use our Operation Log Generator to demonstrate the capabilities of this API.

Talking to Ghostwriter Has Never Been Easier

Ghostwriter & GraphQL

Ghostwriter’s GraphQL API is driven by the Hasura GraphQL Engine. This engine provides three broad GraphQL operations:

Queries Query operations fetch data from Ghostwriter

query domainQueryID {
domain(where: {name: {eq: "mydomain.com"}}) {
id
}
}

MutationsMutation operations manipulate Ghostwriter data

  mutation createSampleClient {
insert_client_one(object: {name: "SpecterPops", codename: "SAMPLE CLIENT", timezone: "America/Los_Angeles"}) {
id
}
}

SubscriptionsSubscription operations allow applications to receive data in real-time

subscription domainHealthMonitoring {
domain(where: {healthStatus: {healthStatus: {_neq: "Healthy"}}}) {
id
name
}
}

Schema Exploration

Ghostwriter’s GraphQL schema can be explored in two different ways:

  1. Hasura Console — The Hasura console allows direct interaction with the Ghostwriter’s PostgreSQL database. Changes made via the console could irreversibly break Ghostwriter, so this option is disabled by default
  2. Ghostwriter’s GraphQL SDL — Ghostwriter’s GraphQL schema is available on Github, and can be safely This article has been indexed from Security Boulevard

Read the original article:

Ghostwriter ❤ Tool Integration