SlideShare a Scribd company logo
1 of 41
Paperwork automation
for product teams
with SpectaQL
Auto-generate
awesome GraphQL
documentation
About
me
Previously at: Flexport, Datanyze, Yahoo, AdRoll
Open Source:
● SpectaQL
● Objection.js
● Microfiber
● Graphql-to-json-schema
● Apollo-server-plugin-introspection-metadata
● Gatsby-plugin-segment-js
Chris Newhouse
Software Engineer at Anvil
3
useanvil.com
Agenda
01 Introduction
02 What is SpectaQL?
03 The Problem
04 The Requirements
05 The Search
06 Features*
08 Themes
09 Getting Started
10 Thank You
07 Metadata
4
useanvil.com
Software infrastructure to
power the evolution of
business processes from
artifact-first to data-first.
About Anvil
5
The Anvil Platform
PDF Services
Easy way to scalably
generate and fill out PDFs
Webforms
Quickly spin up new forms
and capture structured
data
Etch E-Sign
Build signatures into your app
Workflows
Complete paperwork solution,
from data to signed document.
6
useanvil.com
What is SpectaQL?
7
A powerful Node.js library
for auto-generating static
GraphQL docs with ease.
SpectaQL is:
8
8
9
GraphQL:
• Single endpoint, usually
implemented with a POST
• Response is JSON and
usually 200 OK
• A complete Schema is
required
• Very Type-oriented
REST:
• Many endpoints, using the various
HTTP Method Verbs (GET, POST,
PUT, etc)
• Responses types and codes can
vary
• No Schema required, but can be
described using OpenAPI
GraphQL vs REST
SpectaQL is
popular and
actively
maintained
Number of NPM downloads per week
Number of stars on Github
Most common rank among GraphQL
documentation generators
Average number of releases per month
10
useanvil.com
36k
975+
1st
5
“All done, I just need
to update the docs.
Ugh…”
The problem
— Every API Developer
@ Every Company
11
12
Documentation is:
• Hard
• Annoying
• Absolutely necessary
Manual documentation
processes:
• Time consuming
• Requires constant updating
• Requires additional skill sets
• Very hard to ensure completeness
and accuracy
Ahh, documentation…
The requirements
13
Ideal characteristics
Require as little extra
work from the
developer as possible
Easy
Various ways to
provide the necessary
data for various
situations
Flexible
Must be able to be
executed so it can be
part of a build/deploy
process
Programmatic
Hide things,
arrange things,
control "examples",
colors, CSS and styles.
Customizable
No jumping back and
forth between
different areas
Co-Located
14
useanvil.com
The search
15
16
useanvil.com
Choices,
choices,
choices
17
useanvil.com
SpectaQL
18
18
useanvil.com
Selected features
19
SDL (Schema) File
• Provide an SDL file with your
Schema
• Can provide multiple files to
be stitched together
Introspection Query
against a live server
• Hit a live server running your
GraphQL schema
• Supports Authorization
Headers
Introspection Query JSON
• Provide a JSON
representation of your
Introspection Query results
20
useanvil.com
3 methods to provide your schema
This string contains `simple markdown` as
well as a [link to somewhere](https://your-website.com/somewhere).
Markdown is supported in
all description fields
21
useanvil.com
Reference interpolation is
available in all description fields
I'm a description with a reference to [myQuery]({{Queries.myQuery}})
22
useanvil.com
Build modes
Development mode
• Spins up a small, local HTTP
server
• Watches all relevant files
• Re-builds and re-loads upon
file changes
JS & CSS loading modes
• Load as separate resources
• In-line with the HTML
• Omit one or both altogether
HTML output modes
• Standalone / full
• Embeddable ( <body>
only)
23
useanvil.com
Specify logo and favicon
• Feature your company's logo at
the top of the docs
• Add a favicon for browser tabs
and bookmarks
• Can provide hard-coded SVG data
Branding
Specify basic info
• Title
• Introduction
• Contacts
• License
• …more
Easily add additional
introduction sections
• Provide text/markdown
• Provide path to file
• Provide a URL
24
useanvil.com
Metadata
25
Specify the example value shown in your documentation
● Supported on Scalars, Fields, and Arguments
● Will be coerced appropriately
Metadata: "example"
26
useanvil.com
Removes other
references
Boolean value
Metadata: "undocumented"
Supported
everywhere
Overrides the
default visibility
27
Hide specific things
3 methods to provide Metadata
Woven into Introspection Query
• Add to server response or JSON file
• Can add at arbitrary key location
• Supports deep nested paths
• Check out:
apollo-server-plugin-introspection-metadata
Standalone JSON file
• Simple structure
• Arbitrary key location and depth
allowed
@spectaql Directive
• Add directly to your SDL file(s)
• Great for "SDL-First" approaches
28
useanvil.com
29
useanvil.com
@spectaql Directive
type SomeType {
number: Int @spectaql(options: [{ key: "example", value: "42" }]),
randomNumber: Int,
secretField: String @spectaql(options: [{ key: "undocumented", value: "true" }])
}
type Query {
publicQuery: SomeType,
secretQuery: SomeType @spectaql(options: [{ key: "undocumented", value: "true" }])
}
Themes
30
Goals for
themes
31
useanvil.com
● Complete customization
● Reduce project forking
● Easy to write
● Easy to consume
Overview
32
useanvil.com
● Simple directory structure
● Can override as much or as little as you want
● Views, layout, structure, HTML
● Data arrangement
● CSS
● Javascript
● Supports ESM modules
Structure
your-theme-dir/
├── javascripts/
│
├── stylesheets/
│ └── main.scss
│
├── views/
│ ├── partials/
│ ├── main.hbs
│ └── embedded.hbs
│
├── helpers/
│
└── data/
└── index.js
33
useanvil.com
Example:
Dark Theme
34
useanvil.com
# config.yml
spectaql:
# ...
themeDir: ./node_modules/spectaql-dark-theme/theme
# ...
Install theme from NPM
Add to your config file
npm install --dev spectaql-dark-theme
35
useanvil.com
Getting started
36
Quick start
using CLI
For executing as a command
Install SpectaQL from NPM
Define your config file
npm install -g spectaql
# config.yml
spectaql:
logoFile: ./test/fixtures/logo.png
faviconFile: ./test/fixtures/favicon.png
introspection:
schemaFile: ./examples/data/schema.gql
info:
title: GraphQL API Reference
description: Our amazing GraphQL API
servers:
- url: https://example.com/graphql
description: Production
production: true
37
useanvil.com
38
useanvil.com
Using the API
If you need more control
import { run } from 'spectaql'
const spectaqlOptions = {
specFile: 'path/to/your/config.yml',
resolveWithOutput: true,
}
export default async function generateHtml () {
const { html } = await run(spectaqlOptions)
return html
}
39
useanvil.com
Thank you
useanvil.com
github.com/anvilco/spectaql
github: @newhouse
newhouse@useanvil.com
Some Links and ❤️
41
useanvil.com
SpectaQL on Product Hunt
SpectaQL on Hacker News
SpectaQL on NPM
SpectaQL on Nordic APIs
SpectaQL on HackerNoon
SpectaQL on StepZen
SpectaQL on GitHub
SpectaQL on GraphQL Editor
SpectaQL on Atomic Object

More Related Content

Similar to Autogenerate Awesome GraphQL Documentation with SpectaQL

ER/Studio and DB PowerStudio Launch Webinar: Big Data, Big Models, Big News!
ER/Studio and DB PowerStudio Launch Webinar: Big Data, Big Models, Big News! ER/Studio and DB PowerStudio Launch Webinar: Big Data, Big Models, Big News!
ER/Studio and DB PowerStudio Launch Webinar: Big Data, Big Models, Big News! Embarcadero Technologies
 
Strudel: Framework for Transaction Performance Analyses on SQL/NoSQL Systems
Strudel: Framework for Transaction Performance Analyses on SQL/NoSQL SystemsStrudel: Framework for Transaction Performance Analyses on SQL/NoSQL Systems
Strudel: Framework for Transaction Performance Analyses on SQL/NoSQL Systemstatemura
 
Node.js and the MySQL Document Store
Node.js and the MySQL Document StoreNode.js and the MySQL Document Store
Node.js and the MySQL Document StoreRui Quelhas
 
Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2asim78
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government DevelopersFrank La Vigne
 
Data Con LA 2022 - What's new with MongoDB 6.0 and Atlas
Data Con LA 2022 - What's new with MongoDB 6.0 and AtlasData Con LA 2022 - What's new with MongoDB 6.0 and Atlas
Data Con LA 2022 - What's new with MongoDB 6.0 and AtlasData Con LA
 
Rajnish singh(presentation on oracle )
Rajnish singh(presentation on  oracle )Rajnish singh(presentation on  oracle )
Rajnish singh(presentation on oracle )Rajput Rajnish
 
Bring your code to explore the Azure Data Lake: Execute your .NET/Python/R co...
Bring your code to explore the Azure Data Lake: Execute your .NET/Python/R co...Bring your code to explore the Azure Data Lake: Execute your .NET/Python/R co...
Bring your code to explore the Azure Data Lake: Execute your .NET/Python/R co...Michael Rys
 
SplunkLive London 2014 Developer Presentation
SplunkLive London 2014  Developer PresentationSplunkLive London 2014  Developer Presentation
SplunkLive London 2014 Developer PresentationDamien Dallimore
 
Declarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data modelsDeclarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data modelsMonal Daxini
 
Data stores: beyond relational databases
Data stores: beyond relational databasesData stores: beyond relational databases
Data stores: beyond relational databasesJavier García Magna
 
Mongo db eveningschemadesign
Mongo db eveningschemadesignMongo db eveningschemadesign
Mongo db eveningschemadesignMongoDB APAC
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nlbartzon
 
GraphQL the holy contract between client and server
GraphQL the holy contract between client and serverGraphQL the holy contract between client and server
GraphQL the holy contract between client and serverPavel Chertorogov
 
Data Integration Solutions Created By Koneksys
Data Integration Solutions Created By KoneksysData Integration Solutions Created By Koneksys
Data Integration Solutions Created By KoneksysKoneksys
 
Python Ireland Conference 2016 - Python and MongoDB Workshop
Python Ireland Conference 2016 - Python and MongoDB WorkshopPython Ireland Conference 2016 - Python and MongoDB Workshop
Python Ireland Conference 2016 - Python and MongoDB WorkshopJoe Drumgoole
 
Meetup#2: Building responsive Symbology & Suggest WebService
Meetup#2: Building responsive Symbology & Suggest WebServiceMeetup#2: Building responsive Symbology & Suggest WebService
Meetup#2: Building responsive Symbology & Suggest WebServiceMinsk MongoDB User Group
 
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital.AI
 

Similar to Autogenerate Awesome GraphQL Documentation with SpectaQL (20)

ER/Studio and DB PowerStudio Launch Webinar: Big Data, Big Models, Big News!
ER/Studio and DB PowerStudio Launch Webinar: Big Data, Big Models, Big News! ER/Studio and DB PowerStudio Launch Webinar: Big Data, Big Models, Big News!
ER/Studio and DB PowerStudio Launch Webinar: Big Data, Big Models, Big News!
 
Strudel: Framework for Transaction Performance Analyses on SQL/NoSQL Systems
Strudel: Framework for Transaction Performance Analyses on SQL/NoSQL SystemsStrudel: Framework for Transaction Performance Analyses on SQL/NoSQL Systems
Strudel: Framework for Transaction Performance Analyses on SQL/NoSQL Systems
 
Node.js and the MySQL Document Store
Node.js and the MySQL Document StoreNode.js and the MySQL Document Store
Node.js and the MySQL Document Store
 
Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2Asp.Net 3.5 Part 2
Asp.Net 3.5 Part 2
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
 
Data Con LA 2022 - What's new with MongoDB 6.0 and Atlas
Data Con LA 2022 - What's new with MongoDB 6.0 and AtlasData Con LA 2022 - What's new with MongoDB 6.0 and Atlas
Data Con LA 2022 - What's new with MongoDB 6.0 and Atlas
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
Rajnish singh(presentation on oracle )
Rajnish singh(presentation on  oracle )Rajnish singh(presentation on  oracle )
Rajnish singh(presentation on oracle )
 
Bring your code to explore the Azure Data Lake: Execute your .NET/Python/R co...
Bring your code to explore the Azure Data Lake: Execute your .NET/Python/R co...Bring your code to explore the Azure Data Lake: Execute your .NET/Python/R co...
Bring your code to explore the Azure Data Lake: Execute your .NET/Python/R co...
 
SplunkLive London 2014 Developer Presentation
SplunkLive London 2014  Developer PresentationSplunkLive London 2014  Developer Presentation
SplunkLive London 2014 Developer Presentation
 
Declarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data modelsDeclarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data models
 
Data stores: beyond relational databases
Data stores: beyond relational databasesData stores: beyond relational databases
Data stores: beyond relational databases
 
MongoDB.pdf
MongoDB.pdfMongoDB.pdf
MongoDB.pdf
 
Mongo db eveningschemadesign
Mongo db eveningschemadesignMongo db eveningschemadesign
Mongo db eveningschemadesign
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
GraphQL the holy contract between client and server
GraphQL the holy contract between client and serverGraphQL the holy contract between client and server
GraphQL the holy contract between client and server
 
Data Integration Solutions Created By Koneksys
Data Integration Solutions Created By KoneksysData Integration Solutions Created By Koneksys
Data Integration Solutions Created By Koneksys
 
Python Ireland Conference 2016 - Python and MongoDB Workshop
Python Ireland Conference 2016 - Python and MongoDB WorkshopPython Ireland Conference 2016 - Python and MongoDB Workshop
Python Ireland Conference 2016 - Python and MongoDB Workshop
 
Meetup#2: Building responsive Symbology & Suggest WebService
Meetup#2: Building responsive Symbology & Suggest WebServiceMeetup#2: Building responsive Symbology & Suggest WebService
Meetup#2: Building responsive Symbology & Suggest WebService
 
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
 

More from Nordic APIs

How I Built Bill, the AI-Powered Chatbot That Reads Our Docs for Fun , by Tod...
How I Built Bill, the AI-Powered Chatbot That Reads Our Docs for Fun , by Tod...How I Built Bill, the AI-Powered Chatbot That Reads Our Docs for Fun , by Tod...
How I Built Bill, the AI-Powered Chatbot That Reads Our Docs for Fun , by Tod...Nordic APIs
 
The Art of API Design, by David Biesack at Apiture
The Art of API Design, by David Biesack at ApitureThe Art of API Design, by David Biesack at Apiture
The Art of API Design, by David Biesack at ApitureNordic APIs
 
ABAC, ReBAC, Zanzibar, ALFA… How Should I Implement AuthZ in My APIs? by Dav...
ABAC, ReBAC, Zanzibar, ALFA…  How Should I Implement AuthZ in My APIs? by Dav...ABAC, ReBAC, Zanzibar, ALFA…  How Should I Implement AuthZ in My APIs? by Dav...
ABAC, ReBAC, Zanzibar, ALFA… How Should I Implement AuthZ in My APIs? by Dav...Nordic APIs
 
Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...
Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...
Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...Nordic APIs
 
The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...
The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...
The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...Nordic APIs
 
API Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNL
API Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNLAPI Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNL
API Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNLNordic APIs
 
API Discovery from Crawl to Run - Rob Dickinson, Graylog
API Discovery from Crawl to Run - Rob Dickinson, GraylogAPI Discovery from Crawl to Run - Rob Dickinson, Graylog
API Discovery from Crawl to Run - Rob Dickinson, GraylogNordic APIs
 
Productizing and Monetizing APIs - Derric Gilling, Moseif
Productizing and Monetizing APIs - Derric Gilling, MoseifProductizing and Monetizing APIs - Derric Gilling, Moseif
Productizing and Monetizing APIs - Derric Gilling, MoseifNordic APIs
 
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, Sipios
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, SipiosSecurely Boosting Any Product with Generative AI APIs - Ruben Sitbon, Sipios
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, SipiosNordic APIs
 
Security of LLM APIs by Ankita Gupta, Akto.io
Security of LLM APIs by Ankita Gupta, Akto.ioSecurity of LLM APIs by Ankita Gupta, Akto.io
Security of LLM APIs by Ankita Gupta, Akto.ioNordic APIs
 
I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...
I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...
I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...Nordic APIs
 
Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...
Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...
Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...Nordic APIs
 
Reigniting the API Description Wars with TypeSpec and the Next Generation of ...
Reigniting the API Description Wars with TypeSpec and the Next Generation of...Reigniting the API Description Wars with TypeSpec and the Next Generation of...
Reigniting the API Description Wars with TypeSpec and the Next Generation of ...Nordic APIs
 
Establish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAny
Establish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAnyEstablish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAny
Establish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAnyNordic APIs
 
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...Nordic APIs
 
Going Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIs
Going Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIsGoing Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIs
Going Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIsNordic APIs
 
Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...
Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...
Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...Nordic APIs
 
GenAI: Producing and Consuming APIs by Paul Dumas, Gartner
GenAI: Producing and Consuming APIs by Paul Dumas, GartnerGenAI: Producing and Consuming APIs by Paul Dumas, Gartner
GenAI: Producing and Consuming APIs by Paul Dumas, GartnerNordic APIs
 
The SAS developer portal – developer.sas.com 2.0: How we built it by Joe Furb...
The SAS developer portal –developer.sas.com 2.0: How we built it by Joe Furb...The SAS developer portal –developer.sas.com 2.0: How we built it by Joe Furb...
The SAS developer portal – developer.sas.com 2.0: How we built it by Joe Furb...Nordic APIs
 
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...Nordic APIs
 

More from Nordic APIs (20)

How I Built Bill, the AI-Powered Chatbot That Reads Our Docs for Fun , by Tod...
How I Built Bill, the AI-Powered Chatbot That Reads Our Docs for Fun , by Tod...How I Built Bill, the AI-Powered Chatbot That Reads Our Docs for Fun , by Tod...
How I Built Bill, the AI-Powered Chatbot That Reads Our Docs for Fun , by Tod...
 
The Art of API Design, by David Biesack at Apiture
The Art of API Design, by David Biesack at ApitureThe Art of API Design, by David Biesack at Apiture
The Art of API Design, by David Biesack at Apiture
 
ABAC, ReBAC, Zanzibar, ALFA… How Should I Implement AuthZ in My APIs? by Dav...
ABAC, ReBAC, Zanzibar, ALFA…  How Should I Implement AuthZ in My APIs? by Dav...ABAC, ReBAC, Zanzibar, ALFA…  How Should I Implement AuthZ in My APIs? by Dav...
ABAC, ReBAC, Zanzibar, ALFA… How Should I Implement AuthZ in My APIs? by Dav...
 
Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...
Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...
Crafting a Cloud Native API Platform to Accelerate Your Platform Maturity - B...
 
The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...
The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...
The Federated Future: Pioneering Next-Gen Solutions in API Management - Marku...
 
API Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNL
API Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNLAPI Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNL
API Authorization Using an Identity Server and Gateway - Aldo Pietropaolo, SGNL
 
API Discovery from Crawl to Run - Rob Dickinson, Graylog
API Discovery from Crawl to Run - Rob Dickinson, GraylogAPI Discovery from Crawl to Run - Rob Dickinson, Graylog
API Discovery from Crawl to Run - Rob Dickinson, Graylog
 
Productizing and Monetizing APIs - Derric Gilling, Moseif
Productizing and Monetizing APIs - Derric Gilling, MoseifProductizing and Monetizing APIs - Derric Gilling, Moseif
Productizing and Monetizing APIs - Derric Gilling, Moseif
 
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, Sipios
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, SipiosSecurely Boosting Any Product with Generative AI APIs - Ruben Sitbon, Sipios
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, Sipios
 
Security of LLM APIs by Ankita Gupta, Akto.io
Security of LLM APIs by Ankita Gupta, Akto.ioSecurity of LLM APIs by Ankita Gupta, Akto.io
Security of LLM APIs by Ankita Gupta, Akto.io
 
I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...
I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...
I'm an API Hacker, Here's How to Go from Making APIs to Breaking Them - Katie...
 
Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...
Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...
Unleashing the Potential of GraphQL with Streaming Data - Kishore Banala, Net...
 
Reigniting the API Description Wars with TypeSpec and the Next Generation of ...
Reigniting the API Description Wars with TypeSpec and the Next Generation of...Reigniting the API Description Wars with TypeSpec and the Next Generation of...
Reigniting the API Description Wars with TypeSpec and the Next Generation of ...
 
Establish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAny
Establish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAnyEstablish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAny
Establish, Grow, and Mature Your API Platform - James Higginbotham, LaunchAny
 
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations - A...
 
Going Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIs
Going Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIsGoing Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIs
Going Platinum: How to Make a Hit API by Bill Doerrfeld, Nordic APIs
 
Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...
Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...
Getting Better at Risk Management Using Event Driven Mesh Architecture - Ragh...
 
GenAI: Producing and Consuming APIs by Paul Dumas, Gartner
GenAI: Producing and Consuming APIs by Paul Dumas, GartnerGenAI: Producing and Consuming APIs by Paul Dumas, Gartner
GenAI: Producing and Consuming APIs by Paul Dumas, Gartner
 
The SAS developer portal – developer.sas.com 2.0: How we built it by Joe Furb...
The SAS developer portal –developer.sas.com 2.0: How we built it by Joe Furb...The SAS developer portal –developer.sas.com 2.0: How we built it by Joe Furb...
The SAS developer portal – developer.sas.com 2.0: How we built it by Joe Furb...
 
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
How Netflix Uses Data Abstraction to Operate Services at Scale - Vidhya Arvin...
 

Recently uploaded

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Autogenerate Awesome GraphQL Documentation with SpectaQL

  • 3. About me Previously at: Flexport, Datanyze, Yahoo, AdRoll Open Source: ● SpectaQL ● Objection.js ● Microfiber ● Graphql-to-json-schema ● Apollo-server-plugin-introspection-metadata ● Gatsby-plugin-segment-js Chris Newhouse Software Engineer at Anvil 3 useanvil.com
  • 4. Agenda 01 Introduction 02 What is SpectaQL? 03 The Problem 04 The Requirements 05 The Search 06 Features* 08 Themes 09 Getting Started 10 Thank You 07 Metadata 4 useanvil.com
  • 5. Software infrastructure to power the evolution of business processes from artifact-first to data-first. About Anvil 5
  • 6. The Anvil Platform PDF Services Easy way to scalably generate and fill out PDFs Webforms Quickly spin up new forms and capture structured data Etch E-Sign Build signatures into your app Workflows Complete paperwork solution, from data to signed document. 6 useanvil.com
  • 8. A powerful Node.js library for auto-generating static GraphQL docs with ease. SpectaQL is: 8 8
  • 9. 9 GraphQL: • Single endpoint, usually implemented with a POST • Response is JSON and usually 200 OK • A complete Schema is required • Very Type-oriented REST: • Many endpoints, using the various HTTP Method Verbs (GET, POST, PUT, etc) • Responses types and codes can vary • No Schema required, but can be described using OpenAPI GraphQL vs REST
  • 10. SpectaQL is popular and actively maintained Number of NPM downloads per week Number of stars on Github Most common rank among GraphQL documentation generators Average number of releases per month 10 useanvil.com 36k 975+ 1st 5
  • 11. “All done, I just need to update the docs. Ugh…” The problem — Every API Developer @ Every Company 11
  • 12. 12 Documentation is: • Hard • Annoying • Absolutely necessary Manual documentation processes: • Time consuming • Requires constant updating • Requires additional skill sets • Very hard to ensure completeness and accuracy Ahh, documentation…
  • 14. Ideal characteristics Require as little extra work from the developer as possible Easy Various ways to provide the necessary data for various situations Flexible Must be able to be executed so it can be part of a build/deploy process Programmatic Hide things, arrange things, control "examples", colors, CSS and styles. Customizable No jumping back and forth between different areas Co-Located 14 useanvil.com
  • 20. SDL (Schema) File • Provide an SDL file with your Schema • Can provide multiple files to be stitched together Introspection Query against a live server • Hit a live server running your GraphQL schema • Supports Authorization Headers Introspection Query JSON • Provide a JSON representation of your Introspection Query results 20 useanvil.com 3 methods to provide your schema
  • 21. This string contains `simple markdown` as well as a [link to somewhere](https://your-website.com/somewhere). Markdown is supported in all description fields 21 useanvil.com
  • 22. Reference interpolation is available in all description fields I'm a description with a reference to [myQuery]({{Queries.myQuery}}) 22 useanvil.com
  • 23. Build modes Development mode • Spins up a small, local HTTP server • Watches all relevant files • Re-builds and re-loads upon file changes JS & CSS loading modes • Load as separate resources • In-line with the HTML • Omit one or both altogether HTML output modes • Standalone / full • Embeddable ( <body> only) 23 useanvil.com
  • 24. Specify logo and favicon • Feature your company's logo at the top of the docs • Add a favicon for browser tabs and bookmarks • Can provide hard-coded SVG data Branding Specify basic info • Title • Introduction • Contacts • License • …more Easily add additional introduction sections • Provide text/markdown • Provide path to file • Provide a URL 24 useanvil.com
  • 26. Specify the example value shown in your documentation ● Supported on Scalars, Fields, and Arguments ● Will be coerced appropriately Metadata: "example" 26 useanvil.com
  • 27. Removes other references Boolean value Metadata: "undocumented" Supported everywhere Overrides the default visibility 27 Hide specific things
  • 28. 3 methods to provide Metadata Woven into Introspection Query • Add to server response or JSON file • Can add at arbitrary key location • Supports deep nested paths • Check out: apollo-server-plugin-introspection-metadata Standalone JSON file • Simple structure • Arbitrary key location and depth allowed @spectaql Directive • Add directly to your SDL file(s) • Great for "SDL-First" approaches 28 useanvil.com
  • 29. 29 useanvil.com @spectaql Directive type SomeType { number: Int @spectaql(options: [{ key: "example", value: "42" }]), randomNumber: Int, secretField: String @spectaql(options: [{ key: "undocumented", value: "true" }]) } type Query { publicQuery: SomeType, secretQuery: SomeType @spectaql(options: [{ key: "undocumented", value: "true" }]) }
  • 31. Goals for themes 31 useanvil.com ● Complete customization ● Reduce project forking ● Easy to write ● Easy to consume
  • 32. Overview 32 useanvil.com ● Simple directory structure ● Can override as much or as little as you want ● Views, layout, structure, HTML ● Data arrangement ● CSS ● Javascript ● Supports ESM modules
  • 33. Structure your-theme-dir/ ├── javascripts/ │ ├── stylesheets/ │ └── main.scss │ ├── views/ │ ├── partials/ │ ├── main.hbs │ └── embedded.hbs │ ├── helpers/ │ └── data/ └── index.js 33 useanvil.com
  • 34. Example: Dark Theme 34 useanvil.com # config.yml spectaql: # ... themeDir: ./node_modules/spectaql-dark-theme/theme # ... Install theme from NPM Add to your config file npm install --dev spectaql-dark-theme
  • 37. Quick start using CLI For executing as a command Install SpectaQL from NPM Define your config file npm install -g spectaql # config.yml spectaql: logoFile: ./test/fixtures/logo.png faviconFile: ./test/fixtures/favicon.png introspection: schemaFile: ./examples/data/schema.gql info: title: GraphQL API Reference description: Our amazing GraphQL API servers: - url: https://example.com/graphql description: Production production: true 37 useanvil.com
  • 39. Using the API If you need more control import { run } from 'spectaql' const spectaqlOptions = { specFile: 'path/to/your/config.yml', resolveWithOutput: true, } export default async function generateHtml () { const { html } = await run(spectaqlOptions) return html } 39 useanvil.com
  • 41. Some Links and ❤️ 41 useanvil.com SpectaQL on Product Hunt SpectaQL on Hacker News SpectaQL on NPM SpectaQL on Nordic APIs SpectaQL on HackerNoon SpectaQL on StepZen SpectaQL on GitHub SpectaQL on GraphQL Editor SpectaQL on Atomic Object

Editor's Notes

  1. I don't maintain SpectaQL in my spare time, but rather Anvil lets me dedicate work hours towards it as necessary and appropriate. So I'll plug it real quick
  2. Go to dashboard
  3. A powerful, completely customizable Node library for auto-generating complete and beautiful static GraphQL documentation with ease. GraphQL only. Not REST, sorry.
  4. Seems like there's a lot of REST and OpenAPI focus here. And that's great. But what about GraphQL? Anyone used GraphQL? Anyone not used GraphQL? Anyone have an all-or-mostly GraphQL API?
  5. Have also been featured in Nordic APIs (!!!), Hacker News, Product Hunt, Reddit, and more
  6. What good is your API if nobody knows it's there? Or how to use it? Or if it's not up to date?
  7. GraphQL has a defined schema! We should be able to leverage this. Especially with GraphQL Tools JS
  8. GraphiQL GraphQL Playground DociQL None had all the things we wanted: too rigid on inputs too rigid on customization not able to execute via CLI not easy to access output So we decided to make our own…
  9. And so SpectaQL was born!
  10. Have some cool formatting.
  11. Reference any Queries, Mutations, Types or Subscriptions.
  12. Boolean Value: A simple Boolean Indicator Supported Everywhere: Types Fields Arguments Enums Queries Mutations Overrides the Default visibility: Will "hide" an item when the default was to show it, and vice versa. Useful for 1-off overriding of the default behavior. Removes other references: Will intelligently remove things that are no longer referenced. E.g if you remove type Foo, fields and arguments with Foo as the underlying type will also be removed.
  13. ### `javascripts` Any files you add to this folder will be concatenated and then minified into the `spectaql.min.js` file of your build's target directory along with the default files. If you want to simply add an additional JS file to your build, this is your way. Just add it to this folder in your theme directory. You can also replace/overwrite any of SpectaQL's default javascript files. ### `stylesheets` Any `.css` files that you add to this folder will be concatenated and minified into the `spectaql.min.css` file of your build's target directory along with the default CSS. SpectaQL supports SCSS, and the default CSS is built by processing `main.scss` in the default theme's `stylesheets/` directory. If your theme provides a `main.scss` file, it will completely replace the default theme and be used to direct the SCSS -> CSS build. You can then import other `.scss` files from your own custom `main.scss` file. ### `views` SpectaQL uses [Handlebars][handlebars] as its templating engine - please read up on their docs if you'd like to alter this area. Any `.hbs` files that you add to this folder will be overlayed on top of the default theme's directory. SpectaQL will look for the the `main.hbs` file in the resulting `views` directory as the entry point for Handlebars. If your theme provides a `main.hbs` file, that will overwrite the default one and be used to direct the HBS -> HTML build. If you only want to tweak and/or add certain partials, you can do so by only including those customized or additional files in your theme. They will be overlayed on top of the default theme directory in a supplemental manner. SpectaQL also supports running a theme in "embeddable" mode to produce output that can be embeded into an existing HTML page. In "embeddable" mode, the `embedded.hbs` file will be used as the entry point for Handlebars. Depending on the changes you've made, if you want your theme to support "embeddable" mode properly you may need to customize the `embedded.hbs` file in your theme. ### `helpers` [Handlebars][handlebars] allows for Javascript "helpers" to be used throughout its templates. These helpers must exist in the `helpers/` directory. All of SpectaQL's default theme helpers will be available to any custom theme "for free". If you'd like to add more helpers or overwrite an existing helper, simply put your JS file(s) into this folder and they will be copied on top of the default theme's directory and will be available for use in your templates. ### `data` _NOTE:_ This is an experimental API and it could change in a breaking manner at any time before "major" release. Use at your own risk! By default, SpectaQL will use all the non-hidden data that your GraphQL schema has provided, and arrange it in an sane, but opinionated default manner. It will group `Queries` and `Mutations` under an `Operations` header, then it will display all regular `Types`, and finally it will display all `Subscriptions`. You can see the [default arranger source][default-data-arranger] for more on how the default is done. However, if you'd like to completely customize the data that's displayed, and have some basic control over how it's displayed, you can provide a "dynamic data arranger" module. Here's how: - Create your dynamic data arranger module. It should export a function that expects the same arguments that are provided in the [example dynamic data arranger][custom-data-arranger] - Save it to `data/index.js` in your theme directory. _NOTE:_ Again, this is an experimental API and it could change in a breaking manner at any time before "major" release. Use at your own risk!
  14. This theme contains just a single file!
  15. Many of the options supported in the config yaml can be specified via CLI options.
  16. Just a few lines of code. Development mode will spin up a server for you. Watches for changes and will refresh.
  17. Easy to use the API in Node.