Skip to content

Erdromian/pathom-viz

 
 

Repository files navigation

Pathom Viz

Pathom viz is a set of vizualization tools to support the development and inspection of Graph API’s built with the Pathom library.

If you are using Workspaces, this is a great way to try out your parser as a card.

Here is an example of using the card with a Pathom local parser:

(ns my-workspace-cards
  (:require [nubank.workspaces.core :as ws]
            [com.wsscode.pathom.viz.workspaces :as pvw]))

(ws/defcard simple-parser-demo
  (pvw/pathom-card {::pvw/parser parser}))

This will provide you a codemirror editor with query tracing support, like this:

Query Card

The tracing visualization is used by Pathom to provide an efficient way to understand whats happening during the processing of a specific query. But the trace code is generic and you can use it to represent any kind of timeline that follows the same structure.

If you like to embed a Pathom query editor you can use the codemirror components provided at the com.wsscode.pathom.viz.codemirror namespace. The major painpoint is usually maintaing the index updated and

The simplest way to leverage the available tools here is though Fulcro Inspect, you can just install the Chrome extension and it will automatically hook into a Fulcro app and run queries against a Pathom remote.

Get support at #pathom channel in Clojurians Slack.

About

Visualization tools for Pathom

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Clojure 87.9%
  • JavaScript 6.2%
  • CSS 5.1%
  • Other 0.8%