Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade spectaql #358

Merged
merged 5 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"remark-lint-frontmatter-schema": "^3.15.4",
"remark-lint-no-dead-urls": "^1.1.0",
"remark-validate-links": "^13.0.1",
"spectaql": "^3.0.1"
"spectaql": "^3.0.2"
},
"scripts": {
"start": "NODE_OPTIONS='--max-old-space-size=8192' gatsby build && gatsby serve",
Expand All @@ -30,11 +30,9 @@
"serve": "NODE_OPTIONS='--max-old-space-size=8192' gatsby serve",
"clean": "gatsby clean",
"test": "remark src/pages --quiet --frail",
"build:spectaql": "spectaql --target-dir static/graphql-api/ --target-file index.html spectaql/config.yml",
"build:spectaql:beta": "spectaql --target-dir static/graphql-api/beta/ --target-file index.html spectaql/config_beta.yml",
"build:spectaql:2.4.6": "spectaql --target-dir static/graphql-api/2.4.6/ --target-file index.html spectaql/config_2.4.6.yml",
"dev:spectaql": "spectaql --development-mode-live spectaql/config.yml",
"dev:spectaql:beta": "spectaql --development-mode-live spectaql/config_beta.yml",
"build:spectaql": "spectaql --target-file index.html --config spectaql/config.yml",
"build:spectaql:2.4.6": "spectaql --target-file index.html --config spectaql/config_2.4.6.yml",
"dev:spectaql": "spectaql --development-mode-live --config spectaql/config.yml",
"lint": "docker run --rm -e RUN_LOCAL=true --env-file '.github/super-linter.env' -v \"$PWD\":/tmp/lint github/super-linter:slim-v5"
},
"packageManager": "[email protected]"
Expand Down
93 changes: 0 additions & 93 deletions spectaql/adobe-theme/stylesheets/custom.scss

This file was deleted.

100 changes: 71 additions & 29 deletions spectaql/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
---
# This config will not run "as-is" and will need to be modified. You can see a minimal working
# config in /examples/config.yml
#
# Environment variable substitution will be performed by SpectaQL on all strings encountered

spectaql:
# Optional Boolean indicating whether to omit the HTML <body/> and generate the documentation content only
# Default: false
embeddable: true

# Optional Boolean indicating whether to embed all resources (CSS and JS) into the same file
# Default: false
oneFile: false

# Optional path to the target build directory.
# Set to null to not write the output to the filesystem, making it only available via the API (default: public)
#
# Default: public
targetDir: static/graphql-api

# Optional path to an image to use as the logo in the top-left of the output
# logoFile: path/to/logo.png
# Optional boolean indicating whether to encode the local logoFile and embed the image as Base64
# into the resulting HTML. Only applicable if providing the logoFile.
#
# Default: false
embedLogo: false
# Optional boolean indicating whether to preserve the filename of the logo provided.
# If false, the logo name will default to "logo"
# preserveLogoName: false
preserveLogoName: false
# Optional URL to an image to use in your logo. This string will be provided as-is
# to the HTML output. Should not be used with logoFile and its related options as
# this will take precedence over the logoFile.
# logoUrl: https://yoursite.com/images/logo.png
# Control the height of your logo here. Can be useful if your logo is SVG or an
# inappropriate size.
#
Expand All @@ -16,9 +40,18 @@ spectaql:

# Optional path to an image to use as a favicon for the site when it's not embedded
# faviconFile: path/to/favicon.png
# Optional boolean indicating whether to encode the local favicon and embed the image as Base64
# into the resulting HTML. Only applicable if providing the faviconFile.
#
# Default: false
embedFavicon: false
# Optional boolean indicating whether to preserve the filename of the faviconFile provided.
# If false, the favicon name will default to "favicon"
# preserveFaviconName: false
preserveFaviconName: false
# Optional URL to an image to use in your favicon. This string will be provided as-is
# to the HTML output. Should not be used with faviconFile and its related options as
# this will take precedence over the faviconFile.
# faviconUrl: https://yoursite.com/images/favicon.png

# Optional string specifying a path to a theme directory to use for your build.
#
Expand All @@ -31,21 +64,22 @@ spectaql:
# "spectaql": Outputs the same HTML structure as the "default" theme, but with some CSS enhancements
#
# Default: "default"
themeDir: ./spectaql/adobe-theme
# themeDir: path/to/theme
theme: spectaql

# If you're embedding SpectaQL's output and you've got something like a Nav Bar that
# If you're embedding SpectaQL's output, and you've got something like a Nav Bar that
# gets in the way, you can use this value to adjust the scroll offset
#
# Default: None; No "scroll-padding-top" style will be applied.
scrollPaddingTopPx: 0
scrollPaddingTopPx: 10

# If an interpolated reference is not found, should SpectaQL throw an error? Otherwise a warning
# If an interpolated reference is not found, should SpectaQL throw an error? Otherwise, a warning
# will be logged.
#
# Default: true
errorOnInterpolationReferenceNotFound: true

# Would you like to display all the servers listed in the servers area of your config? Otherwise
# Would you like to display all the servers listed in the servers area of your config? Otherwise,
# it will try to display just the one marked "production: true".
#
# Default: false
Expand Down Expand Up @@ -74,14 +108,14 @@ introspection:
# schemaFile:
# - path/to/schema/part1.gql
# - path/to/schema/part2.gql
# schemaFile: schema.graphql
# schemaFile: path/to/schema.gql

# File containing Introspection Query response in JS module export, or JSON format
introspectionFile: spectaql/schema.json

# URL of the GraphQL endpoint to hit if you want to generate the documentation based on live Introspection Query results
# NOTE: If not using introspection.url OR servers[], you need to provide x-url below
# url: http://magento2.127.0.0.1.nip.io/pub/graphql/
# url: https://yoursite.com/graphql

#
#
Expand All @@ -90,15 +124,15 @@ introspection:
# If using the "url" option above, any headers (such as Authorization) can be added here. This
# can also be added via the CLI options
# headers:
# Authorization: Bearer s3cretT0k2n
# Authorization: Bearer s3cretT0k2n

# Some helpful options for those who are an "SDL-first" shop and/or want to get your metadata into
# SpectaQL during the SDL ingestion.
spectaqlDirective:
# Boolean indicating whether to enable and process the @spectaql directive
#
# Default: true
# enable: true
enable: false

# String indicating the name to use for the SpectaQL directive, e.g. "@spectaql"
# This should be inconsequential in the end since it should be removed
Expand Down Expand Up @@ -148,6 +182,13 @@ introspection:
# Default: 1
fieldExpansionDepth: 1

# Include support for @deprecated field on InputType fields.
# NOTE: Be careful, it appears that if you mark an InputType field as deprecated but do NOT set
# this option to `true`, the field will be removed from the schema completely.
#
# Default: false
inputValueDeprecation: true

#
#
##############################################
Expand Down Expand Up @@ -345,12 +386,12 @@ servers:
# Indicates to use this server's URL as the typical GraphQL request base in the documentation
# If no server entries have this indicator, the first server's URL will be used.
# If no server entries are defined at all, the Introspection URL will be used.
production: true
# production: true
# A place to list any Headers for your GraphQL API calls
# headers:
# - name: Authorization
# example: Bearer <YOUR_TOKEN_HERE>
# comment: Your API token from the dashboard. Must be included in all API calls.
headers:
- name: Authorization
example: Bearer <YOUR_TOKEN_HERE>
comment: Your API token from the dashboard. Must be included in all API calls.

info:
# Tries to adhere to OpenAPI Specification https://swagger.io/specification/#info-object
Expand All @@ -368,7 +409,7 @@ info:
x-hideWelcome: false
# Set to true to not render your intro items
# Default: false
x-hideIntroItems: true
x-hideIntroItems: false

# Set to true to not render the deprecated label
# Default: false
Expand All @@ -383,33 +424,34 @@ info:
description: The Adobe Commerce GraphQL API allows you to quickly and efficiently transfer information between your Commerce store and your storefront. The schema documented here is autogenerated from an instance of Adobe Commerce with B2B. You can find examples of each query and mutation in the main <a href="https://developer.adobe.com/commerce/webapi/graphql/schema/" target="_blank">GraphQL documentation</a>.
version: 2.4.7
title: Adobe Commerce GraphQL API
# This is non-standard and optional. If omitted, will use "title". Also only relevant
# This is non-standard and optional. If omitted, will use "title". Also, only relevant
# when building non-embedded.
x-htmlTitle: GraphQL API
# termsOfService: 'https://www.adobe.com/legal/terms.html'
# termsOfService: 'https://yoursite.com/terms'
# contact:
# name: Commerce Help Center
# url: https://support.magento.com/hc/en-us
# name: YourSite Support
# email: [email protected]
# url: https://yoursite.com/support
# license:
# name: Apache 2.0
# url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
# name: Apache 2.0
# url: 'https://www.apache.org/licenses/LICENSE-2.0.html'

# A non-standard array of items to display in your Introduction Area
x-introItems:
# Can be a Title (for the Nav panel) + URL to simply add a link to somewhere
- title: WebAPI guide
url: https://developer.adobe.com/commerce/webapi/
# Can be a Title (for the Nav panel) + description (for the Content panel)
# - title: Contributing
# description: This page is auto-generated from the GraphQL schema obtained from the source code.
# For any issues and updates, contribute to the corresponding module directly.
# - title: Important thing 1
# description: Some important stuff we wanted you to know. Supports `markdown`
# Can be a Title (for the Nav panel) + file that gets loaded (for the Content panel)
# - title: Content from file that supports markdown
# - file: spectaql/intro.md
# file: ./examples/data/intro-items-markdown.md

# If you really want to hide the "Documentation by" at the bottom of your output, you can do so here
# Default: false
x-hidePoweredBy: false

# If not using introspection.url OR servers[], you need to provide x-url
# x-url: https://yoursite.com/graphql
# x-url: https://yoursite.com/graphql

Loading
Loading