├── .changeset
├── README.md
└── config.json
├── .github
├── pull_request_template.md
└── workflows
│ ├── ci.yml
│ ├── code_quality.yml
│ └── release.yml
├── .gitignore
├── .husky
├── .gitignore
└── pre-commit
├── .prettierignore
├── .prettierrc
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── apps
├── desktop
│ ├── .eslintrc
│ ├── .gitignore
│ ├── index.html
│ ├── package.json
│ ├── src-tauri
│ │ ├── .gitignore
│ │ ├── Cargo.lock
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── icons
│ │ │ ├── 128x128.png
│ │ │ ├── 128x128@2x.png
│ │ │ ├── 32x32.png
│ │ │ ├── Square107x107Logo.png
│ │ │ ├── Square142x142Logo.png
│ │ │ ├── Square150x150Logo.png
│ │ │ ├── Square284x284Logo.png
│ │ │ ├── Square30x30Logo.png
│ │ │ ├── Square310x310Logo.png
│ │ │ ├── Square44x44Logo.png
│ │ │ ├── Square71x71Logo.png
│ │ │ ├── Square89x89Logo.png
│ │ │ ├── StoreLogo.png
│ │ │ ├── icon.icns
│ │ │ ├── icon.ico
│ │ │ └── icon.png
│ │ ├── src
│ │ │ └── main.rs
│ │ └── tauri.conf.json
│ ├── src
│ │ ├── components
│ │ │ └── app
│ │ │ │ ├── app.css.ts
│ │ │ │ └── app.tsx
│ │ ├── index.tsx
│ │ └── types.d.ts
│ ├── tsconfig.json
│ ├── tsconfig.node.json
│ ├── vite-env.d.ts
│ └── vite.config.ts
├── graphql-yoga-server
│ ├── constants.ts
│ ├── index.ts
│ └── package.json
├── ladle
│ ├── .env.development.local.example
│ ├── .eslintrc.json
│ ├── .ladle
│ │ ├── components.tsx
│ │ ├── config.mjs
│ │ └── styles.css
│ ├── package.json
│ ├── tsconfig.json
│ └── vite.config.ts
└── website
│ ├── .gitignore
│ ├── README.md
│ ├── astro.config.mjs
│ ├── package.json
│ ├── public
│ ├── favicon.svg
│ └── og.jpg
│ ├── src
│ ├── components
│ │ ├── Card.astro
│ │ └── DownloadButton.tsx
│ ├── env.d.ts
│ ├── images
│ │ ├── bg.png
│ │ ├── oss.png
│ │ ├── powerful-foundation.png
│ │ ├── preview.png
│ │ ├── schema-browser.png
│ │ └── visual-operation-builder.png
│ ├── layouts
│ │ └── Layout.astro
│ └── pages
│ │ └── index.astro
│ ├── tailwind.config.js
│ └── tsconfig.json
├── examples
├── nextjs-example
│ ├── .eslintrc.json
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── next-env.d.ts
│ ├── next.config.js
│ ├── package-lock.json
│ ├── package.json
│ ├── postcss.config.js
│ ├── public
│ │ ├── next.svg
│ │ └── vercel.svg
│ ├── src
│ │ └── app
│ │ │ ├── favicon.ico
│ │ │ ├── globals.css
│ │ │ ├── layout.tsx
│ │ │ └── page.tsx
│ ├── tailwind.config.js
│ └── tsconfig.json
└── vite-example
│ ├── .eslintrc.cjs
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.html
│ ├── package.json
│ ├── public
│ └── vite.svg
│ ├── src
│ ├── App.css
│ ├── App.tsx
│ ├── assets
│ │ └── react.svg
│ ├── index.css
│ ├── main.tsx
│ └── vite-env.d.ts
│ ├── tsconfig.json
│ ├── tsconfig.node.json
│ └── vite.config.ts
├── flake.lock
├── flake.nix
├── package.json
├── packages
├── eslint-config
│ ├── eslint-config.js
│ └── package.json
├── react
│ ├── .eslintrc
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── __mocks__
│ │ ├── monaco-editor
│ │ │ ├── canvas.ts
│ │ │ ├── get-selection.ts
│ │ │ ├── match-media.ts
│ │ │ ├── query-command-supported.ts
│ │ │ ├── resize-observer.ts
│ │ │ └── worker.ts
│ │ └── zustand.ts
│ ├── package.json
│ ├── src
│ │ ├── compass
│ │ │ ├── compass-store
│ │ │ │ ├── actions
│ │ │ │ │ ├── add-target-argument.ts
│ │ │ │ │ ├── add-target-field.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── remove-target-argument.ts
│ │ │ │ │ ├── remove-target-field.ts
│ │ │ │ │ └── toggle.ts
│ │ │ │ ├── compass-store.tsx
│ │ │ │ ├── compass-store.types.ts
│ │ │ │ ├── constants.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── state.ts
│ │ │ │ └── utils
│ │ │ │ │ ├── find-next-token-kind-in-location.ts
│ │ │ │ │ ├── find-selection.ts
│ │ │ │ │ ├── generate-argument-text.ts
│ │ │ │ │ ├── generate-selection-breadcrumbs-from-ancestors.ts
│ │ │ │ │ ├── generate-text.ts
│ │ │ │ │ ├── generate-variable-text.ts
│ │ │ │ │ ├── get-active-definition-range.ts
│ │ │ │ │ ├── get-add-edit.ts
│ │ │ │ │ ├── get-add-range-for-field-from-location.ts
│ │ │ │ │ ├── get-ancestor-text.ts
│ │ │ │ │ ├── get-enum-values.ts
│ │ │ │ │ ├── get-location-from-ancestor.ts
│ │ │ │ │ ├── get-position-at-end-of-location.ts
│ │ │ │ │ ├── get-previous-ancestor.ts
│ │ │ │ │ ├── get-range-from-string-in-active-definition.ts
│ │ │ │ │ ├── get-remove-range-for-field-from-location.ts
│ │ │ │ │ ├── get-remove-range.ts
│ │ │ │ │ ├── get-root-ancestor.ts
│ │ │ │ │ ├── get-selected-arguments-count.ts
│ │ │ │ │ ├── get-variable-definitions-count.ts
│ │ │ │ │ ├── has-sibling-selections.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── insert-new-operation.ts
│ │ │ │ │ └── unwrap-non-null-argument-type.ts
│ │ │ ├── compass.css.ts
│ │ │ ├── compass.tsx
│ │ │ ├── components
│ │ │ │ ├── argument
│ │ │ │ │ ├── argument.css.ts
│ │ │ │ │ ├── argument.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── arguments
│ │ │ │ │ ├── arguments.css.ts
│ │ │ │ │ ├── arguments.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── collapse-control
│ │ │ │ │ ├── collapse-control.css.ts
│ │ │ │ │ ├── collapse-control.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── details-actions
│ │ │ │ │ ├── details-actions.css.ts
│ │ │ │ │ ├── details-actions.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── details
│ │ │ │ │ ├── details.css.ts
│ │ │ │ │ ├── details.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── field
│ │ │ │ │ ├── field.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── fields
│ │ │ │ │ ├── fields.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── indicator-leaf
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── indicator-leaf.css.ts
│ │ │ │ │ └── indicator-leaf.tsx
│ │ │ │ ├── list-item
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── list-item.css.ts
│ │ │ │ │ ├── list-item.tsx
│ │ │ │ │ └── list-item.types.ts
│ │ │ │ ├── quick-docs
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── quick-docs.css.ts
│ │ │ │ │ └── quick-docs.tsx
│ │ │ │ ├── root-operation
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── root-operation.css.ts
│ │ │ │ │ └── root-operation.tsx
│ │ │ │ └── union
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── union.tsx
│ │ │ └── index.ts
│ │ ├── components
│ │ │ ├── action-execute-subscription
│ │ │ │ ├── action-execute-subscription.css.ts
│ │ │ │ ├── action-execute-subscription.tsx
│ │ │ │ └── index.ts
│ │ │ ├── action-execute
│ │ │ │ ├── action-execute.tsx
│ │ │ │ └── index.ts
│ │ │ ├── action-prettier
│ │ │ │ ├── action-prettier.tsx
│ │ │ │ └── index.ts
│ │ │ ├── actions-bar
│ │ │ │ ├── actions-bar.css.ts
│ │ │ │ ├── actions-bar.tsx
│ │ │ │ ├── components--actions-bar.stories.tsx
│ │ │ │ └── index.ts
│ │ │ ├── analyze
│ │ │ │ ├── analyze.css.ts
│ │ │ │ ├── analyze.tsx
│ │ │ │ └── index.ts
│ │ │ ├── beacon-animated
│ │ │ │ ├── beacon-animated.css.ts
│ │ │ │ ├── beacon-animated.tsx
│ │ │ │ └── index.ts
│ │ │ ├── button
│ │ │ │ ├── button.css.ts
│ │ │ │ ├── button.tsx
│ │ │ │ └── index.ts
│ │ │ ├── compass-animated
│ │ │ │ ├── compass-animated.css.ts
│ │ │ │ ├── compass-animated.tsx
│ │ │ │ ├── components--compass-animated.stories.tsx
│ │ │ │ └── index.ts
│ │ │ ├── connect
│ │ │ │ ├── connect.css.ts
│ │ │ │ ├── connect.tsx
│ │ │ │ └── index.ts
│ │ │ ├── connection-bar
│ │ │ │ ├── connection-bar.css.ts
│ │ │ │ ├── connection-bar.tsx
│ │ │ │ └── index.ts
│ │ │ ├── control
│ │ │ │ ├── components--control.stories.tsx
│ │ │ │ ├── control.css.ts
│ │ │ │ ├── control.tsx
│ │ │ │ ├── control.types.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── input.tsx
│ │ │ │ └── select.tsx
│ │ │ ├── document-notification
│ │ │ │ ├── document-notification.css.ts
│ │ │ │ ├── document-notification.tsx
│ │ │ │ └── index.ts
│ │ │ ├── dropdown
│ │ │ │ ├── dropdown.css.ts
│ │ │ │ ├── dropdown.tsx
│ │ │ │ └── index.ts
│ │ │ ├── editor-tabs
│ │ │ │ ├── editor-tabs.css.ts
│ │ │ │ ├── editor-tabs.tsx
│ │ │ │ └── index.ts
│ │ │ ├── editor
│ │ │ │ ├── components--editor.stories.tsx
│ │ │ │ ├── editor.css.ts
│ │ │ │ ├── editor.tsx
│ │ │ │ ├── editor.types.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── workers.ts
│ │ │ ├── history
│ │ │ │ ├── history-item-request
│ │ │ │ │ ├── history-item-request.css.ts
│ │ │ │ │ ├── history-item-request.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── history-item-response
│ │ │ │ │ ├── history-item-response.css.ts
│ │ │ │ │ ├── history-item-response.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── history-list-item
│ │ │ │ │ ├── history-list-item.css.ts
│ │ │ │ │ ├── history-list-item.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── history.css.ts
│ │ │ │ ├── history.tsx
│ │ │ │ └── index.ts
│ │ │ ├── http-header-control
│ │ │ │ ├── components--http-header-control.stories.tsx
│ │ │ │ ├── http-header-control.css.ts
│ │ │ │ ├── http-header-control.tsx
│ │ │ │ └── index.ts
│ │ │ ├── icon-button
│ │ │ │ ├── components--iconbutton.stories.tsx
│ │ │ │ ├── icon-button.css.ts
│ │ │ │ ├── icon-button.tsx
│ │ │ │ └── index.ts
│ │ │ ├── icon
│ │ │ │ ├── arrow-right
│ │ │ │ │ ├── arrow-right.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── caret
│ │ │ │ │ ├── caret.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── chevron
│ │ │ │ │ ├── chevron.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── close
│ │ │ │ │ ├── close.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── compass
│ │ │ │ │ ├── compass.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── components--icon.stories.tsx
│ │ │ │ ├── delete
│ │ │ │ │ ├── delete.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── docs
│ │ │ │ │ ├── docs.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── ellipsis
│ │ │ │ │ ├── ellipsis.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── gear
│ │ │ │ │ ├── gear.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── graphql
│ │ │ │ │ ├── graphql.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── icon.css.ts
│ │ │ │ ├── icon.tsx
│ │ │ │ ├── icon.types.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── insert-new-operation
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── insert-new-operation.tsx
│ │ │ │ ├── interpunct
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── interpunct.tsx
│ │ │ │ ├── magnifing-glass
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── magnifing-glass.tsx
│ │ │ │ ├── pause
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── pause.tsx
│ │ │ │ ├── plus
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── plus.tsx
│ │ │ │ └── prettier
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── prettier.tsx
│ │ │ ├── index.ts
│ │ │ ├── kbd
│ │ │ │ ├── components--kdb.stories.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── kbd.css.ts
│ │ │ │ └── kbd.tsx
│ │ │ ├── loading-schema
│ │ │ │ ├── index.ts
│ │ │ │ ├── loading-schema.css.ts
│ │ │ │ └── loading-schema.tsx
│ │ │ ├── operate
│ │ │ │ ├── components--operate.stories.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── operate.css.ts
│ │ │ │ └── operate.tsx
│ │ │ ├── pill
│ │ │ │ ├── components--pill.stories.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── pill.css.ts
│ │ │ │ └── pill.tsx
│ │ │ ├── pre
│ │ │ │ ├── index.ts
│ │ │ │ ├── pre.css.ts
│ │ │ │ └── pre.tsx
│ │ │ ├── resizer
│ │ │ │ ├── components--resizer.stories.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── resizer-store
│ │ │ │ │ ├── actions
│ │ │ │ │ │ ├── get-initial-grid-template.ts
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── reset-pane.ts
│ │ │ │ │ │ └── set-resizer-state.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── resizer-store.ts
│ │ │ │ │ ├── resizer-store.types.ts
│ │ │ │ │ └── use-resizer-store.ts
│ │ │ │ ├── resizer.css.ts
│ │ │ │ ├── resizer.tsx
│ │ │ │ └── resizer.types.ts
│ │ │ ├── scout-tools
│ │ │ │ ├── components--scout-tools.stories.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── scout-tools.css.ts
│ │ │ │ └── scout-tools.tsx
│ │ │ ├── sessions
│ │ │ │ ├── index.ts
│ │ │ │ ├── sessions.css.ts
│ │ │ │ └── sessions.tsx
│ │ │ ├── spinner
│ │ │ │ ├── index.ts
│ │ │ │ ├── spinner.css.ts
│ │ │ │ └── spinner.tsx
│ │ │ ├── switch
│ │ │ │ ├── components--switch.stories.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── switch.css.ts
│ │ │ │ └── switch.tsx
│ │ │ ├── tabs
│ │ │ │ ├── components--tabs.stories.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── tabs.css.ts
│ │ │ │ ├── tabs.tsx
│ │ │ │ └── tabs.types.ts
│ │ │ ├── theme-switcher
│ │ │ │ ├── index.ts
│ │ │ │ └── theme-switcher.tsx
│ │ │ └── variables
│ │ │ │ ├── index.ts
│ │ │ │ ├── variables.css.ts
│ │ │ │ └── variables.tsx
│ │ ├── ide
│ │ │ ├── ide.tsx
│ │ │ └── index.ts
│ │ ├── index.ts
│ │ ├── pathfinder
│ │ │ ├── index.ts
│ │ │ ├── pathfinder.css.ts
│ │ │ ├── pathfinder.stories.tsx
│ │ │ ├── pathfinder.test.tsx
│ │ │ ├── pathfinder.tsx
│ │ │ └── pathfinder.types.ts
│ │ ├── reference
│ │ │ ├── index.ts
│ │ │ ├── reference.css.ts
│ │ │ └── reference.tsx
│ │ ├── schema-documentation
│ │ │ ├── components
│ │ │ │ ├── arguments-list
│ │ │ │ │ ├── arguments-list.css.ts
│ │ │ │ │ ├── arguments-list.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── default-value
│ │ │ │ │ ├── default-value.css.ts
│ │ │ │ │ ├── default-value.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── delimiter
│ │ │ │ │ ├── delimiter.css.ts
│ │ │ │ │ ├── delimiter.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── leaf
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── leaf.css.ts
│ │ │ │ ├── markdown
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── markdown.css.ts
│ │ │ │ │ └── markdown.tsx
│ │ │ │ ├── schema-documentation
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── schema-documentation.css.ts
│ │ │ │ │ └── schema-documentation.tsx
│ │ │ │ ├── secondary-pane
│ │ │ │ │ ├── secondary-pane.css.ts
│ │ │ │ │ └── secondary-pane.tsx
│ │ │ │ ├── section
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── section.css.ts
│ │ │ │ ├── summary
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── summary.css.ts
│ │ │ │ │ └── summary.tsx
│ │ │ │ ├── tertiary-pane
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── tertiary-pane.css.ts
│ │ │ │ │ └── tertiary-pane.tsx
│ │ │ │ ├── type-system-nav-button
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── type-system-nav-button.css.ts
│ │ │ │ │ └── type-system-nav-button.tsx
│ │ │ │ └── types-nav.tsx
│ │ │ ├── index.ts
│ │ │ ├── schema-documentation.stories.tsx
│ │ │ ├── shared.styles.css.ts
│ │ │ ├── store
│ │ │ │ ├── actions.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── schema-documentation-store.tsx
│ │ │ │ ├── schema-documentation-store.types.ts
│ │ │ │ └── state.ts
│ │ │ ├── types
│ │ │ │ └── index.ts
│ │ │ └── utils
│ │ │ │ ├── index.ts
│ │ │ │ └── sort-types.ts
│ │ ├── schema-view
│ │ │ ├── index.tsx
│ │ │ ├── schema-view.css.ts
│ │ │ ├── schema-view.stories.tsx
│ │ │ └── schema-view.tsx
│ │ ├── scout
│ │ │ ├── index.ts
│ │ │ ├── scout.css.ts
│ │ │ └── scout.tsx
│ │ └── types.ts
│ ├── tsconfig.json
│ ├── vite-env.d.ts
│ ├── vite.config.ts
│ ├── vite.lite.config.ts
│ ├── vitest.setup.ts
│ └── workers
│ │ └── build-workers.js
├── shared
│ ├── .eslintrc
│ ├── package.json
│ ├── src
│ │ ├── constants.ts
│ │ ├── index.ts
│ │ ├── types.ts
│ │ └── utils
│ │ │ ├── graphql
│ │ │ ├── index.ts
│ │ │ └── unwrap-type.ts
│ │ │ ├── index.ts
│ │ │ ├── misc
│ │ │ └── generate-cuid.ts
│ │ │ └── zustand
│ │ │ ├── create-zustand-selectors.ts
│ │ │ └── index.ts
│ └── tsconfig.json
├── stores
│ ├── .eslintrc
│ ├── package.json
│ ├── src
│ │ ├── cleanup-stores.ts
│ │ ├── graphql-document-store
│ │ │ ├── actions
│ │ │ │ ├── get-parsed-document.ts
│ │ │ │ ├── handle-active-definition.ts
│ │ │ │ ├── handle-inactive-definition.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── is-operation-name-changing.ts
│ │ │ │ ├── reset-document-state.ts
│ │ │ │ ├── set-active-document-entry.ts
│ │ │ │ ├── set-document-notifications.ts
│ │ │ │ ├── set-document-state.ts
│ │ │ │ └── update-document-entry-operation-name.ts
│ │ │ ├── graphql-document-store.ts
│ │ │ ├── graphql-document-store.types.ts
│ │ │ ├── index.ts
│ │ │ ├── state.ts
│ │ │ ├── use-graphql-document-store.ts
│ │ │ └── utils.ts
│ │ ├── index.ts
│ │ ├── monaco-editor-store
│ │ │ ├── actions
│ │ │ │ ├── create-monaco-editor.ts
│ │ │ │ ├── dispose-monaco-editor.ts
│ │ │ │ ├── get-monaco-editor.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── initialize-monaco-editor.ts
│ │ │ │ ├── monaco-import.ts
│ │ │ │ ├── push-monaco-editor-edit.ts
│ │ │ │ ├── run-execute-operation.ts
│ │ │ │ └── set-monaco-editor-theme.ts
│ │ │ ├── helpers
│ │ │ │ ├── editor-options.ts
│ │ │ │ └── editor-theme.ts
│ │ │ ├── index.ts
│ │ │ ├── monaco-editor-store.ts
│ │ │ ├── monaco-editor-store.types.ts
│ │ │ ├── state.ts
│ │ │ └── use-monaco-editor-store.ts
│ │ ├── monaco-graphql-store
│ │ │ ├── actions
│ │ │ │ ├── index.ts
│ │ │ │ ├── init-monaco-graphql-api.ts
│ │ │ │ └── set-monaco-graphql-schema.ts
│ │ │ ├── index.ts
│ │ │ ├── monaco-graphql-store.ts
│ │ │ └── monaco-graphql-store.types.ts
│ │ ├── schema-store
│ │ │ ├── actions
│ │ │ │ ├── do-introspection.ts
│ │ │ │ ├── do-schema-polling.ts
│ │ │ │ ├── execute-operation.ts
│ │ │ │ ├── http-fetcher.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── load-schema.ts
│ │ │ │ ├── reset-schema-polling.ts
│ │ │ │ └── set-schema-polling-timer.ts
│ │ │ ├── helpers
│ │ │ │ ├── merge-results.ts
│ │ │ │ └── using-defer.ts
│ │ │ ├── index.ts
│ │ │ ├── schema-store.ts
│ │ │ ├── schema-store.types.ts
│ │ │ ├── state.ts
│ │ │ ├── test-schema
│ │ │ │ ├── index.ts
│ │ │ │ └── scalar-stubs.ts
│ │ │ └── use-schema-store.ts
│ │ ├── session-store
│ │ │ ├── actions
│ │ │ │ ├── get-sessions.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── init-session.ts
│ │ │ │ └── load-session.ts
│ │ │ ├── index.ts
│ │ │ ├── session-store-state.ts
│ │ │ ├── session-store.ts
│ │ │ ├── session-store.types.ts
│ │ │ ├── slices
│ │ │ │ ├── editor-tabs
│ │ │ │ │ ├── actions
│ │ │ │ │ │ ├── close-editor-tab.ts
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── init-new-editor-tab.ts
│ │ │ │ │ │ ├── set-editor-values.ts
│ │ │ │ │ │ ├── switch-editor-tab.ts
│ │ │ │ │ │ └── update-editor-tab.ts
│ │ │ │ │ ├── editor-tabs-state.ts
│ │ │ │ │ ├── editor-tabs.types.ts
│ │ │ │ │ └── index.ts
│ │ │ │ ├── history
│ │ │ │ │ ├── actions
│ │ │ │ │ │ ├── clear-history.ts
│ │ │ │ │ │ ├── delete-from-history.ts
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── history-state.ts
│ │ │ │ │ ├── history.types.ts
│ │ │ │ │ └── index.ts
│ │ │ │ ├── http-headers
│ │ │ │ │ ├── actions
│ │ │ │ │ │ ├── add-empty-header.ts
│ │ │ │ │ │ ├── get-enabled-http-header-values.ts
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── remove-header.ts
│ │ │ │ │ │ └── update-header.ts
│ │ │ │ │ ├── http-headers-state.ts
│ │ │ │ │ ├── http-headers.types.ts
│ │ │ │ │ └── index.ts
│ │ │ │ └── variables
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── variables-state.ts
│ │ │ │ │ └── variables.types.ts
│ │ │ └── use-session-store.ts
│ │ ├── storage.ts
│ │ ├── theme-store
│ │ │ ├── actions
│ │ │ │ ├── index.ts
│ │ │ │ ├── initialize-theme.ts
│ │ │ │ ├── listen-for-prefers-color-scheme-change.ts
│ │ │ │ ├── set-theme-overrides.ts
│ │ │ │ └── set-theme.ts
│ │ │ ├── index.ts
│ │ │ ├── theme-store.ts
│ │ │ ├── theme-store.types.ts
│ │ │ ├── use-theme-store.ts
│ │ │ └── utils
│ │ │ │ ├── getUserPreferredTheme.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── munge-theme-overrides.ts
│ │ └── ui-store
│ │ │ ├── index.ts
│ │ │ ├── ui-store.ts
│ │ │ └── ui-store.types.ts
│ └── tsconfig.json
├── style
│ ├── .eslintrc
│ ├── package.json
│ ├── src
│ │ ├── constants.ts
│ │ ├── index.ts
│ │ ├── shared
│ │ │ ├── hairline-border.css.ts
│ │ │ ├── index.ts
│ │ │ ├── resets.css.ts
│ │ │ ├── scrollbars.css.ts
│ │ │ └── transitions.ts
│ │ ├── theme
│ │ │ ├── color.ts
│ │ │ ├── contract.css.ts
│ │ │ ├── dark.css.ts
│ │ │ ├── fonts.ts
│ │ │ ├── global.css.ts
│ │ │ ├── index.ts
│ │ │ ├── light.css.ts
│ │ │ └── space.ts
│ │ ├── types.ts
│ │ └── utils
│ │ │ ├── index.ts
│ │ │ └── to-title-case.ts
│ └── tsconfig.json
└── tsconfig
│ ├── base.json
│ ├── package.json
│ └── react.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── renovate.json
└── turbo.json
/.changeset/README.md:
--------------------------------------------------------------------------------
1 | # Changesets
2 |
3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4 | with multi-package repos, or single-package repos to help you version and publish your code. You can
5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6 |
7 | We have a quick list of common questions to get you started engaging with this project in
8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
9 |
--------------------------------------------------------------------------------
/.changeset/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
3 | "changelog": "@changesets/cli/changelog",
4 | "commit": false,
5 | "fixed": [],
6 | "linked": [],
7 | "access": "restricted",
8 | "baseBranch": "main",
9 | "updateInternalDependencies": "patch",
10 | "ignore": [
11 | "@pathfinder-ide/website",
12 | "nextjs-example",
13 | "vite-example",
14 | "desktop",
15 | "ladle"
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | # Description
2 |
3 | Please include a summary of the change and which issue is fixed.
4 | Please also include relevant motivation and context.
5 |
6 | # Type of change
7 |
8 | - [ ] 💔 Breaking
9 | - [ ] 🚀 Feature
10 | - [ ] 🐛 Fix
11 | - [ ] 🛠️ Tooling
12 | - [ ] 🔨 Refactoring
13 | - [ ] 🧪 Test
14 | - [ ] 📦 Dependency
15 | - [ ] 📖 Requires documentation update
16 |
--------------------------------------------------------------------------------
/.github/workflows/code_quality.yml:
--------------------------------------------------------------------------------
1 | name: Code quality
2 |
3 | on: push
4 |
5 | jobs:
6 | code_quality:
7 | runs-on: ubuntu-latest
8 |
9 | steps:
10 | - name: Checkout Repo
11 | uses: actions/checkout@v4
12 |
13 | - name: Install pnpm
14 | uses: pnpm/action-setup@v3
15 | with:
16 | version: 9
17 | - uses: actions/setup-node@v4
18 | with:
19 | node-version: 20
20 | cache: 'pnpm'
21 | - run: pnpm install
22 |
23 | - name: Types check
24 | run: pnpm types
25 |
26 | - name: Lint check
27 | run: pnpm lint
28 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Release
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | concurrency: ${{ github.workflow }}-${{ github.ref }}
9 |
10 | jobs:
11 | release:
12 | name: Release
13 | runs-on: ubuntu-22.04
14 | steps:
15 | - name: Checkout Repo
16 | uses: actions/checkout@v4
17 |
18 | - name: Install pnpm
19 | uses: pnpm/action-setup@v3
20 | with:
21 | version: 9
22 | - uses: actions/setup-node@v4
23 | with:
24 | node-version: 20
25 | cache: 'pnpm'
26 | - run: pnpm install
27 |
28 | - name: Create Release Pull Request or Publish to npm
29 | id: changesets
30 | uses: changesets/action@v1
31 | with:
32 | # This expects you to have a script called release which does a build for your packages and calls changeset publish
33 | publish: pnpm release
34 | env:
35 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 | NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
37 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # dependencies
2 | node_modules
3 | .pnp
4 | .pnp.js
5 |
6 | # next.js
7 | .next/
8 | out/
9 |
10 | # production
11 | build
12 | dist
13 |
14 | # misc
15 | .DS_Store
16 | *.pem
17 |
18 | # debug
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
23 | # local env files
24 | .env
25 | .env.local
26 | .env.development.local
27 | .env.test.local
28 | .env.production.local
29 |
30 | # typescript
31 | *.tsbuildinfo
32 |
33 | # ide
34 | .idea
35 | .vscode
36 |
37 | # Turbo
38 | .turbo
39 | .direnv
40 |
--------------------------------------------------------------------------------
/.husky/.gitignore:
--------------------------------------------------------------------------------
1 | _
2 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | npx lint-staged
5 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | # all examples
2 | /examples/*
3 |
4 | # built workers
5 | /packages/react/workers/*.bundle.js
6 |
7 | **/node_modules
8 |
9 | pnpm-lock.yaml
10 |
11 | # artifacts:
12 | build
13 | dist
14 | public
15 | coverage
16 | /apps/desktop/src-tauri/target/*
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "printWidth": 90,
3 | "semi": true,
4 | "singleQuote": true
5 | }
6 |
--------------------------------------------------------------------------------
/apps/desktop/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["@pathfinder-ide/eslint-config"]
3 | }
4 |
--------------------------------------------------------------------------------
/apps/desktop/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "desktop",
3 | "private": true,
4 | "version": "0.1.5",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "vite",
8 | "build": "tsc && vite build",
9 | "preview": "vite preview",
10 | "tauri": "tauri",
11 | "types": "tsc --noEmit"
12 | },
13 | "dependencies": {
14 | "react": "18.3.1",
15 | "react-dom": "18.3.1",
16 | "@tauri-apps/api": "^1.4.0"
17 | },
18 | "devDependencies": {
19 | "@pathfinder-ide/react": "workspace:*",
20 | "@pathfinder-ide/eslint-config": "workspace:*",
21 | "@pathfinder-ide/style": "workspace:*",
22 | "@tauri-apps/cli": "^1.4.0",
23 | "@types/react": "18.3.12",
24 | "@types/react-dom": "18.3.1",
25 | "@vanilla-extract/css": "1.14.2",
26 | "@vanilla-extract/vite-plugin": "3.9.5",
27 | "@vitejs/plugin-react": "4.3.3",
28 | "typescript": "5.5.4",
29 | "vite": "5.4.3"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/.gitignore:
--------------------------------------------------------------------------------
1 | # Generated by Cargo
2 | # will have compiled files and executables
3 | /target/
4 |
5 |
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "desktop"
3 | version = "0.1.5"
4 | description = "The Pathfinder desktop application"
5 | authors = ["Grafbase"]
6 | license = "MPL-2.0"
7 | repository = "https://github.com/grafbase/pathfinder"
8 | edition = "2021"
9 |
10 | [build-dependencies]
11 | tauri-build = { version = "1.5", features = [] }
12 |
13 | [dependencies]
14 | tauri = { version = "1.5", features = [ "window-close", "window-start-dragging", "window-maximize", "window-hide", "window-minimize", "window-show", "window-unminimize", "window-unmaximize", "shell-open"] }
15 | serde = { version = "1.0", features = ["derive"] }
16 | serde_json = "1.0"
17 |
18 | [features]
19 | # this feature is used for production builds or when `devPath` points to the filesystem
20 | # DO NOT REMOVE!!
21 | custom-protocol = ["tauri/custom-protocol"]
22 |
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/build.rs:
--------------------------------------------------------------------------------
1 | fn main() {
2 | tauri_build::build()
3 | }
4 |
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/128x128.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/128x128@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/128x128@2x.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/32x32.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/Square107x107Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/Square107x107Logo.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/Square142x142Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/Square142x142Logo.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/Square150x150Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/Square150x150Logo.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/Square284x284Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/Square284x284Logo.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/Square30x30Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/Square30x30Logo.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/Square310x310Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/Square310x310Logo.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/Square44x44Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/Square44x44Logo.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/Square71x71Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/Square71x71Logo.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/Square89x89Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/Square89x89Logo.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/StoreLogo.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/icon.icns
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/icon.ico
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/icons/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/desktop/src-tauri/icons/icon.png
--------------------------------------------------------------------------------
/apps/desktop/src-tauri/src/main.rs:
--------------------------------------------------------------------------------
1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!!
2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
3 |
4 | fn main() {
5 | tauri::Builder::default()
6 | .run(tauri::generate_context!())
7 | .expect("error while running Pathfinder");
8 | }
9 |
--------------------------------------------------------------------------------
/apps/desktop/src/components/app/app.css.ts:
--------------------------------------------------------------------------------
1 | import { style, globalStyle } from '@pathfinder-ide/style';
2 |
3 | export const appContainer = style({
4 | display: 'block',
5 | height: '100%',
6 | padding: 0,
7 | margin: 0,
8 | });
9 |
10 | globalStyle('html', {
11 | background: 'rgb(35,35,35)',
12 | });
13 |
--------------------------------------------------------------------------------
/apps/desktop/src/components/app/app.tsx:
--------------------------------------------------------------------------------
1 | // relative path import here to src components
2 | // this allows us to dev without the build step and forgo importing the built css file
3 | import { Pathfinder } from '../../../../../packages/react/src';
4 |
5 | import { appContainer } from './app.css';
6 |
7 | export const App = () => {
8 | return (
9 |
12 | );
13 | };
14 |
--------------------------------------------------------------------------------
/apps/desktop/src/index.tsx:
--------------------------------------------------------------------------------
1 | import { StrictMode } from 'react';
2 |
3 | import { createRoot } from 'react-dom/client';
4 |
5 | import { App } from './components/app/app';
6 |
7 | const container = document.getElementById('root') as HTMLElement;
8 |
9 | const root = createRoot(container);
10 |
11 | root.render(
12 |
13 |
14 | ,
15 | );
16 |
--------------------------------------------------------------------------------
/apps/desktop/src/types.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | // vite
4 | interface ImportMetaEnv {
5 | readonly VITE_GRAFBASE_API_KEY: string;
6 | readonly VITE_GRAFBASE_ENDPOINT: string;
7 | }
8 |
9 | interface ImportMeta {
10 | readonly env: ImportMetaEnv;
11 | }
12 |
13 | export {};
14 |
--------------------------------------------------------------------------------
/apps/desktop/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2020",
4 | "useDefineForClassFields": true,
5 | "lib": ["ES2020", "DOM", "DOM.Iterable"],
6 | "module": "ESNext",
7 | "skipLibCheck": true,
8 | "moduleResolution": "bundler",
9 | "allowImportingTsExtensions": true,
10 | "resolveJsonModule": true,
11 | "isolatedModules": true,
12 | "noEmit": true,
13 | "jsx": "react-jsx",
14 | "strict": true,
15 | "noUnusedLocals": true,
16 | "noUnusedParameters": true,
17 | "noFallthroughCasesInSwitch": true,
18 | "types": ["node", "./vite-env.d.ts"]
19 | },
20 | "include": ["src"],
21 | "references": [{ "path": "./tsconfig.node.json" }]
22 | }
23 |
--------------------------------------------------------------------------------
/apps/desktop/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "skipLibCheck": true,
5 | "module": "ESNext",
6 | "moduleResolution": "bundler",
7 | "allowSyntheticDefaultImports": true
8 | },
9 | "include": ["vite.config.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/apps/desktop/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | interface ImportMeta {
4 | readonly __IS_LITE_MODE_?: boolean;
5 | }
6 |
--------------------------------------------------------------------------------
/apps/desktop/vite.config.ts:
--------------------------------------------------------------------------------
1 | import react from '@vitejs/plugin-react';
2 | import { defineConfig } from 'vite';
3 | import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
4 |
5 | export default defineConfig(() => {
6 | return {
7 | base: '/',
8 | build: {
9 | rollupOptions: {
10 | output: {
11 | entryFileNames: `assets/[name].js`,
12 | chunkFileNames: `assets/[name].js`,
13 | assetFileNames: `assets/[name].[ext]`,
14 | },
15 | },
16 | },
17 | // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
18 | //
19 | // 1. prevent vite from obscuring rust errors
20 | clearScreen: false,
21 | // 2. tauri expects a fixed port, fail if that port is not available
22 | server: {
23 | port: 1420,
24 | strictPort: true,
25 | },
26 | // 3. to make use of `TAURI_DEBUG` and other env variables
27 | // https://tauri.studio/v1/api/config#buildconfig.beforedevcommand
28 | envPrefix: ['VITE_', 'TAURI_'],
29 | plugins: [react(), vanillaExtractPlugin({})],
30 | };
31 | });
32 |
--------------------------------------------------------------------------------
/apps/graphql-yoga-server/constants.ts:
--------------------------------------------------------------------------------
1 | export const PORT = 4123;
2 |
--------------------------------------------------------------------------------
/apps/graphql-yoga-server/index.ts:
--------------------------------------------------------------------------------
1 | import { createServer } from 'node:http';
2 | import { createYoga } from 'graphql-yoga';
3 | import { testSchema } from '../../packages/stores/src/schema-store/test-schema';
4 | import { PORT } from './constants';
5 | import { useDeferStream } from '@graphql-yoga/plugin-defer-stream';
6 |
7 | // Create a Yoga instance with a GraphQL schema.
8 | const yoga = createYoga({ schema: testSchema, plugins: [useDeferStream()] });
9 |
10 | // Pass it into a server to hook into request handlers.
11 | const server = createServer(yoga);
12 |
13 | // Start the server and you're done!
14 | server.listen(PORT, () => {
15 | console.info(`Server is running on http://localhost:${PORT}/graphql`);
16 | });
17 |
--------------------------------------------------------------------------------
/apps/graphql-yoga-server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "graphql-yoga-server",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "dev": "ts-node ./index.ts"
7 | },
8 | "devDependencies": {
9 | "@pathfinder-ide/stores": "workspace:*",
10 | "graphql-yoga": "5.7.0",
11 | "ts-node": "^10.9.1"
12 | },
13 | "dependencies": {
14 | "@graphql-yoga/plugin-defer-stream": "3.7.0"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/apps/ladle/.env.development.local.example:
--------------------------------------------------------------------------------
1 | VITE_LOCAL_GRAPHQL_ENDPOINT=http://localhost:4123/graphql
2 | VITE_REMOTE_GRAPHQL_ENDPOINT=
3 | VITE_REMOTE_GRAPHQL_API_KEY=
--------------------------------------------------------------------------------
/apps/ladle/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["@pathfinder-ide/eslint-config"],
3 | "ignorePatterns": ["!.ladle"]
4 | }
5 |
--------------------------------------------------------------------------------
/apps/ladle/.ladle/config.mjs:
--------------------------------------------------------------------------------
1 | export default {
2 | stories: ['../../packages/react/src/**/*.stories.tsx'],
3 | addons: {
4 | theme: {
5 | enabled: false,
6 | defaultState: 'light',
7 | },
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/apps/ladle/.ladle/styles.css:
--------------------------------------------------------------------------------
1 | html,
2 | body {
3 | height: 100%;
4 | width: 100%;
5 | }
6 |
7 | #ladle-root {
8 | height: 100%;
9 | width: 100%;
10 | position: relative;
11 |
12 | .ladle-theme-switcher {
13 | position: absolute;
14 | bottom: 0;
15 | right: 0;
16 | z-index: 10;
17 | }
18 | }
19 |
20 | .ladle-main {
21 | padding: 0;
22 | position: relative;
23 | }
24 |
--------------------------------------------------------------------------------
/apps/ladle/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ladle",
3 | "version": "0.0.1",
4 | "private": true,
5 | "type": "module",
6 | "scripts": {
7 | "lint": "eslint .",
8 | "preview": "ladle preview",
9 | "serve": "NODE_ENV=development ladle serve",
10 | "dev": "concurrently \"pnpm serve\" \"pnpm --filter graphql-yoga-server dev\"",
11 | "types": "tsc --noEmit"
12 | },
13 | "dependencies": {
14 | "@ladle/react": "4.0.2",
15 | "monaco-editor": "0.40.0",
16 | "monaco-graphql": "1.3.0",
17 | "react": "18.3.1",
18 | "react-dom": "18.3.1"
19 | },
20 | "devDependencies": {
21 | "@pathfinder-ide/eslint-config": "workspace:*",
22 | "@pathfinder-ide/react": "workspace:*",
23 | "@pathfinder-ide/style": "workspace:*",
24 | "@pathfinder-ide/tsconfig": "workspace:*",
25 | "@types/react": "18.3.12",
26 | "@types/react-dom": "18.3.1",
27 | "@vanilla-extract/vite-plugin": "3.9.5",
28 | "@vitejs/plugin-react": "4.3.3",
29 | "concurrently": "^8.2.2",
30 | "vite": "5.4.3"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/apps/ladle/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@pathfinder-ide/tsconfig/react.json",
3 | "compilerOptions": {
4 | "types": ["vite/client"]
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/apps/ladle/vite.config.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | import { defineConfig } from 'vite';
4 |
5 | import pluginReact from '@vitejs/plugin-react';
6 |
7 | import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
8 |
9 | export default defineConfig(({ command, mode }) => {
10 | console.log('launching ladle:', { command, mode });
11 | return {
12 | server: {
13 | open: false,
14 | },
15 | plugins: [
16 | pluginReact(),
17 | vanillaExtractPlugin({
18 | identifiers: 'debug',
19 | }),
20 | ],
21 | };
22 | });
23 |
--------------------------------------------------------------------------------
/apps/website/.gitignore:
--------------------------------------------------------------------------------
1 | # build output
2 | dist/
3 |
4 | # generated types
5 | .astro/
6 |
7 | # vercel
8 | .vercel/
9 |
10 | # dependencies
11 | node_modules/
12 |
13 | # logs
14 | npm-debug.log*
15 | yarn-debug.log*
16 | yarn-error.log*
17 | pnpm-debug.log*
18 |
19 | # environment variables
20 | .env
21 | .env.production
22 |
23 | # macOS-specific files
24 | .DS_Store
25 |
--------------------------------------------------------------------------------
/apps/website/astro.config.mjs:
--------------------------------------------------------------------------------
1 | import tailwind from '@astrojs/tailwind';
2 | import react from '@astrojs/react';
3 | import { defineConfig } from 'astro/config';
4 | import vercel from '@astrojs/vercel/static';
5 |
6 | // https://astro.build/config
7 | export default defineConfig({
8 | integrations: [tailwind(), react()],
9 | adapter: vercel({
10 | imageService: true,
11 | }),
12 | });
13 |
--------------------------------------------------------------------------------
/apps/website/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@pathfinder-ide/website",
3 | "type": "module",
4 | "version": "0.0.1",
5 | "private": true,
6 | "scripts": {
7 | "dev": "astro dev",
8 | "start": "astro dev",
9 | "build": "astro build",
10 | "preview": "astro preview",
11 | "astro": "astro"
12 | },
13 | "dependencies": {
14 | "@astrojs/react": "3.6.2",
15 | "@astrojs/tailwind": "5.1.2",
16 | "@astrojs/vercel": "7.8.2",
17 | "@fontsource/inter": "5.1.0",
18 | "astro": "3.6.5",
19 | "react": "18.3.1",
20 | "react-dom": "18.3.1",
21 | "sharp": "0.33.4",
22 | "tailwindcss": "3.4.4"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/apps/website/public/og.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/website/public/og.jpg
--------------------------------------------------------------------------------
/apps/website/src/env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/apps/website/src/images/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/website/src/images/bg.png
--------------------------------------------------------------------------------
/apps/website/src/images/oss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/website/src/images/oss.png
--------------------------------------------------------------------------------
/apps/website/src/images/powerful-foundation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/website/src/images/powerful-foundation.png
--------------------------------------------------------------------------------
/apps/website/src/images/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/website/src/images/preview.png
--------------------------------------------------------------------------------
/apps/website/src/images/schema-browser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/website/src/images/schema-browser.png
--------------------------------------------------------------------------------
/apps/website/src/images/visual-operation-builder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/apps/website/src/images/visual-operation-builder.png
--------------------------------------------------------------------------------
/apps/website/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const defaultTheme = require('tailwindcss/defaultTheme');
2 |
3 | /** @type {import('tailwindcss').Config} */
4 | module.exports = {
5 | content: ['./src/**/*.{astro,tsx}'],
6 | theme: {
7 | extend: {
8 | fontFamily: {
9 | sans: ['Inter', ...defaultTheme.fontFamily.sans],
10 | },
11 | },
12 | },
13 | };
14 |
--------------------------------------------------------------------------------
/apps/website/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | // Enable top-level await, and other modern ESM features.
4 | "target": "ESNext",
5 | "module": "ESNext",
6 | // Enable node-style module resolution, for things like npm package imports.
7 | "moduleResolution": "node",
8 | // Enable JSON imports.
9 | "resolveJsonModule": true,
10 | // Enable stricter transpilation for better output.
11 | "isolatedModules": true,
12 | // Astro will directly run your TypeScript code, no transpilation needed.
13 | "noEmit": true,
14 | // Enable strict type checking.
15 | "strict": true,
16 | "jsx": "react"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/examples/nextjs-example/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals",
3 | "rules": {
4 | "@next/next/no-html-link-for-pages": "off"
5 | }
6 | }
--------------------------------------------------------------------------------
/examples/nextjs-example/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # nextjs-example
2 |
3 | ## 0.1.2
4 |
5 | ### Patch Changes
6 |
7 | - d4040c1: remove types script from nextjs-example
8 |
9 | ## 0.1.1
10 |
11 | ### Patch Changes
12 |
13 | - Updated dependencies [e331579]
14 | - @pathfinder-ide/react@0.1.1
15 |
--------------------------------------------------------------------------------
/examples/nextjs-example/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // NOTE: This file should not be edited
5 | // see https://nextjs.org/docs/basic-features/typescript for more information.
6 |
--------------------------------------------------------------------------------
/examples/nextjs-example/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 |
3 | const nextConfig = {
4 | reactStrictMode: true,
5 | }
6 |
7 | module.exports = nextConfig;
8 |
--------------------------------------------------------------------------------
/examples/nextjs-example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nextjs-example",
3 | "version": "0.1.2",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "lint": "next lint",
8 | "start": "next start",
9 | "types:check": "tsc --noEmit"
10 | },
11 | "dependencies": {
12 | "@pathfinder-ide/react": "workspace:*",
13 | "@types/node": "20.4.5",
14 | "@types/react": "18.2.48",
15 | "@types/react-dom": "18.2.7",
16 | "autoprefixer": "10.4.14",
17 | "eslint": "8.56.0",
18 | "eslint-config-next": "13.4.12",
19 | "graphql": "^16.9.0",
20 | "next": "13.5.3",
21 | "next-global-css": "1.3.1",
22 | "postcss": "8.4.27",
23 | "react": "18.2.0",
24 | "react-dom": "18.2.0",
25 | "tailwindcss": "3.4.1",
26 | "typescript": "5.1.6"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/examples/nextjs-example/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/examples/nextjs-example/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/nextjs-example/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grafbase/pathfinder/e6ac1c75a80fa06e2806399d9148fa8bce304f65/examples/nextjs-example/src/app/favicon.ico
--------------------------------------------------------------------------------
/examples/nextjs-example/src/app/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | :root {
6 | --foreground-rgb: 0, 0, 0;
7 | --background-start-rgb: 214, 219, 220;
8 | --background-end-rgb: 255, 255, 255;
9 | }
10 |
11 | @media (prefers-color-scheme: dark) {
12 | :root {
13 | --foreground-rgb: 255, 255, 255;
14 | --background-start-rgb: 0, 0, 0;
15 | --background-end-rgb: 0, 0, 0;
16 | }
17 | }
18 |
19 | html {
20 | height: 100%;
21 | width: 100%;
22 | }
23 |
24 | body {
25 | height: 100%;
26 | width: 100%;
27 | color: rgb(var(--foreground-rgb));
28 | background: linear-gradient(
29 | to bottom,
30 | transparent,
31 | rgb(var(--background-end-rgb))
32 | )
33 | rgb(var(--background-start-rgb));
34 | }
35 |
--------------------------------------------------------------------------------
/examples/nextjs-example/src/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import './globals.css'
2 | import type { Metadata } from 'next'
3 | import { Inter } from 'next/font/google'
4 |
5 | const inter = Inter({ subsets: ['latin'] })
6 |
7 | export const metadata: Metadata = {
8 | title: 'Create Next App',
9 | description: 'Generated by create next app',
10 | }
11 |
12 | export default function RootLayout({
13 | children,
14 | }: {
15 | children: React.ReactNode
16 | }) {
17 | return (
18 |
19 | {children}
20 |
21 | )
22 | }
23 |
--------------------------------------------------------------------------------
/examples/nextjs-example/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | content: [
4 | './src/pages/**/*.{js,ts,jsx,tsx,mdx}',
5 | './src/components/**/*.{js,ts,jsx,tsx,mdx}',
6 | './src/app/**/*.{js,ts,jsx,tsx,mdx}',
7 | ],
8 | theme: {
9 | extend: {
10 | backgroundImage: {
11 | 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
12 | 'gradient-conic':
13 | 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
14 | },
15 | },
16 | },
17 | plugins: [],
18 | }
19 |
--------------------------------------------------------------------------------
/examples/nextjs-example/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ESNext",
4 | "lib": ["dom", "dom.iterable", "ESNext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "forceConsistentCasingInFileNames": true,
9 | "noEmit": true,
10 | "esModuleInterop": true,
11 | "module": "ESNext",
12 | "moduleResolution": "bundler",
13 | "resolveJsonModule": true,
14 | "isolatedModules": true,
15 | "jsx": "preserve",
16 | "incremental": true,
17 | "plugins": [
18 | {
19 | "name": "next"
20 | }
21 | ],
22 | "paths": {
23 | "@/*": ["./src/*"]
24 | }
25 | },
26 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
27 | "exclude": ["node_modules"]
28 | }
29 |
--------------------------------------------------------------------------------
/examples/vite-example/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: { browser: true, es2020: true },
4 | extends: [
5 | 'eslint:recommended',
6 | 'plugin:@typescript-eslint/recommended',
7 | 'plugin:react-hooks/recommended',
8 | ],
9 | ignorePatterns: ['dist', '.eslintrc.cjs'],
10 | parser: '@typescript-eslint/parser',
11 | plugins: ['react-refresh'],
12 | rules: {
13 | 'react-refresh/only-export-components': [
14 | 'warn',
15 | { allowConstantExport: true },
16 | ],
17 | },
18 | }
19 |
--------------------------------------------------------------------------------
/examples/vite-example/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
--------------------------------------------------------------------------------
/examples/vite-example/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # vite-example
2 |
3 | ## 0.0.1
4 |
5 | ### Patch Changes
6 |
7 | - Updated dependencies [1611586]
8 | - @pathfinder-ide/react@0.3.2
9 |
--------------------------------------------------------------------------------
/examples/vite-example/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Vite + React + TS
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/vite-example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vite-example",
3 | "private": true,
4 | "version": "0.0.1",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "vite --force",
8 | "build": "tsc && vite build",
9 | "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10 | "preview": "vite preview"
11 | },
12 | "dependencies": {
13 | "@pathfinder-ide/react": "workspace:*",
14 | "react": "^18.2.0",
15 | "react-dom": "^18.2.0"
16 | },
17 | "devDependencies": {
18 | "@types/react": "^18.2.48",
19 | "@types/react-dom": "^18.2.13",
20 | "@typescript-eslint/eslint-plugin": "^6.0.0",
21 | "@typescript-eslint/parser": "^6.0.0",
22 | "@vitejs/plugin-react": "^4.0.3",
23 | "eslint": "^8.56.0",
24 | "eslint-plugin-react-hooks": "^4.6.0",
25 | "eslint-plugin-react-refresh": "^0.4.3",
26 | "typescript": "^5.0.2",
27 | "vite": "5.4.2"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/examples/vite-example/src/App.css:
--------------------------------------------------------------------------------
1 | #root {
2 | width: 100%;
3 | margin: 0 auto;
4 | padding: 2rem;
5 | }
6 |
7 | .logo {
8 | height: 6em;
9 | padding: 1.5em;
10 | will-change: filter;
11 | transition: filter 300ms;
12 | }
13 | .logo:hover {
14 | filter: drop-shadow(0 0 2em #646cffaa);
15 | }
16 | .logo.react:hover {
17 | filter: drop-shadow(0 0 2em #61dafbaa);
18 | }
19 |
20 | @keyframes logo-spin {
21 | from {
22 | transform: rotate(0deg);
23 | }
24 | to {
25 | transform: rotate(360deg);
26 | }
27 | }
28 |
29 | @media (prefers-reduced-motion: no-preference) {
30 | a:nth-of-type(2) .logo {
31 | animation: logo-spin infinite 20s linear;
32 | }
33 | }
34 |
35 | .card {
36 | padding: 2em;
37 | }
38 |
39 | .read-the-docs {
40 | color: #888;
41 | }
42 |
43 | .pathfinder-wrap {
44 | height: 35vh;
45 | }
46 |
--------------------------------------------------------------------------------
/examples/vite-example/src/main.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactDOM from 'react-dom/client'
3 | import App from './App.tsx'
4 | import './index.css'
5 |
6 | ReactDOM.createRoot(document.getElementById('root')!).render(
7 |
8 |
9 | ,
10 | )
11 |
--------------------------------------------------------------------------------
/examples/vite-example/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/vite-example/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2020",
4 | "useDefineForClassFields": true,
5 | "lib": ["ES2020", "DOM", "DOM.Iterable"],
6 | "module": "ESNext",
7 | "skipLibCheck": true,
8 |
9 | /* Bundler mode */
10 | "moduleResolution": "bundler",
11 | "allowImportingTsExtensions": true,
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "noEmit": true,
15 | "jsx": "react-jsx",
16 |
17 | /* Linting */
18 | "strict": true,
19 | "noUnusedLocals": true,
20 | "noUnusedParameters": true,
21 | "noFallthroughCasesInSwitch": true
22 | },
23 | "include": ["src"],
24 | "references": [{ "path": "./tsconfig.node.json" }]
25 | }
26 |
--------------------------------------------------------------------------------
/examples/vite-example/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "skipLibCheck": true,
5 | "module": "ESNext",
6 | "moduleResolution": "bundler",
7 | "allowSyntheticDefaultImports": true
8 | },
9 | "include": ["vite.config.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/examples/vite-example/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vitejs.dev/config/
5 | export default defineConfig({
6 | plugins: [react()],
7 | })
8 |
--------------------------------------------------------------------------------
/packages/eslint-config/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@pathfinder-ide/eslint-config",
3 | "version": "0.0.1",
4 | "private": true,
5 | "main": "eslint-config.js",
6 | "devDependencies": {
7 | "@typescript-eslint/eslint-plugin": "6.10.0",
8 | "@typescript-eslint/parser": "6.10.0",
9 | "eslint": "8.57.1",
10 | "eslint-plugin-jest-dom": "5.4.0",
11 | "eslint-plugin-react-hooks": "4.6.2",
12 | "eslint-plugin-testing-library": "6.2.2"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/packages/react/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["@pathfinder-ide/eslint-config"],
3 | "ignorePatterns": ["workers/*.bundle.js"]
4 | }
5 |
--------------------------------------------------------------------------------
/packages/react/.gitignore:
--------------------------------------------------------------------------------
1 | # workers
2 | *.worker.bundle.js
3 | lite-dist
4 |
--------------------------------------------------------------------------------
/packages/react/__mocks__/monaco-editor/canvas.ts:
--------------------------------------------------------------------------------
1 | import 'vitest-canvas-mock';
2 |
--------------------------------------------------------------------------------
/packages/react/__mocks__/monaco-editor/get-selection.ts:
--------------------------------------------------------------------------------
1 | import { vi } from 'vitest';
2 |
3 | Range.prototype.getBoundingClientRect = () => ({
4 | bottom: 0,
5 | height: 0,
6 | left: 0,
7 | right: 0,
8 | top: 0,
9 | width: 0,
10 | x: 0,
11 | y: 0,
12 | toJSON: vi.fn(),
13 | });
14 |
15 | // this isn't pretty but it gets us past an error (TypeError: Cannot read properties of undefined (reading 'top')) in "monaco-editor/esm/vs/editor/browser/view/domLineBreaksComputer.js"
16 | Range.prototype.getClientRects = () => [
17 | // @ts-ignore
18 | {
19 | top: 0,
20 | },
21 | ];
22 |
--------------------------------------------------------------------------------
/packages/react/__mocks__/monaco-editor/match-media.ts:
--------------------------------------------------------------------------------
1 | import { vi } from 'vitest';
2 |
3 | Object.defineProperty(window, 'matchMedia', {
4 | writable: true,
5 | value: vi.fn().mockImplementation((query) => ({
6 | matches: false,
7 | media: query,
8 | onchange: null,
9 | addListener: vi.fn(), // deprecated
10 | removeListener: vi.fn(), // deprecated
11 | addEventListener: vi.fn(),
12 | removeEventListener: vi.fn(),
13 | dispatchEvent: vi.fn(),
14 | })),
15 | });
16 |
--------------------------------------------------------------------------------
/packages/react/__mocks__/monaco-editor/query-command-supported.ts:
--------------------------------------------------------------------------------
1 | global.document.queryCommandSupported = () => false;
2 |
--------------------------------------------------------------------------------
/packages/react/__mocks__/monaco-editor/resize-observer.ts:
--------------------------------------------------------------------------------
1 | import { vi } from 'vitest';
2 |
3 | global.ResizeObserver = vi.fn().mockImplementation(() => ({
4 | observe: vi.fn(),
5 | unobserve: vi.fn(),
6 | disconnect: vi.fn(),
7 | }));
8 |
--------------------------------------------------------------------------------
/packages/react/__mocks__/monaco-editor/worker.ts:
--------------------------------------------------------------------------------
1 | window.URL.createObjectURL = function () {
2 | return '';
3 | };
4 | if (typeof Worker === 'undefined') {
5 | global.Worker = class {
6 | addEventListener() {}
7 |
8 | removeEventListener() {}
9 |
10 | dispatchEvent() {
11 | return false;
12 | }
13 |
14 | onmessage() {}
15 |
16 | onmessageerror() {}
17 |
18 | onerror() {}
19 |
20 | postMessage() {}
21 |
22 | terminate() {}
23 | };
24 | }
25 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/actions/index.ts:
--------------------------------------------------------------------------------
1 | export { addTargetArgument } from './add-target-argument';
2 |
3 | export { addTargetField } from './add-target-field';
4 |
5 | export { removeTargetArgument } from './remove-target-argument';
6 |
7 | export { removeTargetField } from './remove-target-field';
8 |
9 | export { toggle } from './toggle';
10 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/compass-store.tsx:
--------------------------------------------------------------------------------
1 | import { createStore } from 'zustand';
2 |
3 | import { compassState } from './state';
4 |
5 | import type { CompassState } from './compass-store.types';
6 |
7 | export const compassStore = createStore(() => ({
8 | ...compassState,
9 | }));
10 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/constants.ts:
--------------------------------------------------------------------------------
1 | export const INDENT_SIZE = 2;
2 |
3 | const PHONE_NUMBER = '+14155550169';
4 | // @ts-ignore
5 | const JSON = [];
6 | const URL = 'https://grafbase.com/';
7 | const TIMESTAMP = '1682626018389';
8 | const IP_ADDRESS = '(123.12.34.56)';
9 | const EMAIL = 'example@grafbase.com';
10 | const DATE_TIME = '2007-12-03T10:15:30Z';
11 | const DATE = '2007-12-03';
12 | const BOOLEAN = true;
13 | const FLOAT = String(parseFloat('1.23'));
14 | const INT = String(parseInt('10', 10));
15 | const STRING = '';
16 | const ID = 'some_id_123456789';
17 |
18 | export const DEFAULT_SCALAR_VALUES = {
19 | PHONE_NUMBER,
20 | // @ts-ignore
21 | JSON,
22 | URL,
23 | TIMESTAMP,
24 | IP_ADDRESS,
25 | EMAIL,
26 | DATE_TIME,
27 | DATE,
28 | BOOLEAN,
29 | FLOAT,
30 | INT,
31 | STRING,
32 | ID,
33 | };
34 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/index.ts:
--------------------------------------------------------------------------------
1 | export { toggle } from './actions';
2 |
3 | export { compassStore } from './compass-store';
4 |
5 | export type {
6 | AncestorArgument,
7 | AncestorField,
8 | AncestorInlineFragment,
9 | AncestorRoot,
10 | AncestorTypes,
11 | AncestorsArray,
12 | } from './compass-store.types';
13 |
14 | export {
15 | findSelection,
16 | generateSelectionBreadcrumbsFromAncestors,
17 | insertNewOperation,
18 | } from './utils';
19 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/state.ts:
--------------------------------------------------------------------------------
1 | import { CompassState } from './compass-store.types';
2 |
3 | export const compassState: CompassState = {
4 | argumentHandlingMode: 'INLINE',
5 | };
6 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/find-next-token-kind-in-location.ts:
--------------------------------------------------------------------------------
1 | import { Token, TokenKind } from 'graphql';
2 |
3 | export const findNextTokenKindInLocation = ({
4 | startToken,
5 | tokenKind,
6 | }: {
7 | startToken: Token;
8 | tokenKind: TokenKind;
9 | }): Token | null => {
10 | const nextToken = startToken.next;
11 |
12 | if (!nextToken) {
13 | return null;
14 | }
15 |
16 | if (nextToken.kind === tokenKind) {
17 | return nextToken;
18 | } else {
19 | return findNextTokenKindInLocation({ startToken: nextToken, tokenKind });
20 | }
21 | };
22 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/generate-selection-breadcrumbs-from-ancestors.ts:
--------------------------------------------------------------------------------
1 | import { AncestorsArray } from '../compass-store.types';
2 |
3 | // selection breadcrumbs help identify toggle buttons in tests
4 | export const generateSelectionBreadcrumbsFromAncestors = ({
5 | ancestors,
6 | }: {
7 | ancestors: AncestorsArray;
8 | }) =>
9 | [...ancestors]
10 | // eslint-disable-next-line consistent-return
11 | .map((ancestor) => {
12 | if (ancestor.type === 'FIELD') {
13 | return ancestor.field.name;
14 | }
15 | if (ancestor.type === 'ARGUMENT') {
16 | return ancestor.argument.name;
17 | }
18 | if (ancestor.type === 'INLINE_FRAGMENT') {
19 | return `on${ancestor.onType}`;
20 | }
21 | })
22 | .join('/');
23 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/generate-variable-text.ts:
--------------------------------------------------------------------------------
1 | import type { GraphQLArgument } from 'graphql';
2 |
3 | export const generateVariableText = ({ argument }: { argument: GraphQLArgument }) =>
4 | `$${argument.name}: ${argument.type.toString()}`;
5 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/get-active-definition-range.ts:
--------------------------------------------------------------------------------
1 | import { type MonacoIRange, graphQLDocumentStore } from '@pathfinder-ide/stores';
2 |
3 | export const getActiveDefinitionRange = (): MonacoIRange | null => {
4 | const activeDocumentEntry = graphQLDocumentStore.getState().activeDocumentEntry;
5 |
6 | if (activeDocumentEntry?.node.loc) {
7 | return {
8 | startColumn: activeDocumentEntry.node.loc.startToken.column,
9 | endColumn: activeDocumentEntry.node.loc.endToken.column + 1,
10 | startLineNumber: activeDocumentEntry.node.loc.startToken.line,
11 | endLineNumber: activeDocumentEntry.node.loc.endToken.line,
12 | };
13 | }
14 | return null;
15 | };
16 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/get-ancestor-text.ts:
--------------------------------------------------------------------------------
1 | import type { AncestorField, AncestorInlineFragment } from '../compass-store.types';
2 |
3 | export const getAncestorText = ({
4 | ancestor,
5 | }: {
6 | ancestor: AncestorField | AncestorInlineFragment;
7 | }) => {
8 | if (ancestor.type === 'FIELD') {
9 | return ancestor.field.name;
10 | }
11 | if (ancestor.type === 'INLINE_FRAGMENT') {
12 | return `... on ${ancestor.onType}`;
13 | }
14 | return console.error('error generating ancestor text');
15 | };
16 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/get-enum-values.ts:
--------------------------------------------------------------------------------
1 | import { type GraphQLSchema, isEnumType } from 'graphql';
2 |
3 | export const getEnumValues = ({
4 | enumTypeName,
5 | schema,
6 | }: {
7 | enumTypeName: string;
8 | schema: GraphQLSchema;
9 | }): Array<{ name: string; value: string }> | undefined => {
10 | const enumType = schema.getType(enumTypeName);
11 |
12 | if (!isEnumType(enumType)) {
13 | return undefined;
14 | }
15 |
16 | return enumType.getValues().map((v) => ({
17 | value: v.value,
18 | name: v.name,
19 | description: v.description || undefined,
20 | }));
21 | };
22 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/get-location-from-ancestor.ts:
--------------------------------------------------------------------------------
1 | import { type AncestorTypes } from '../compass-store.types';
2 |
3 | export const getLocationFromAncestor = ({ ancestor }: { ancestor: AncestorTypes }) => {
4 | if (
5 | (ancestor.type === 'INLINE_FRAGMENT' || ancestor.type === 'FIELD') &&
6 | ancestor.selection
7 | ) {
8 | return ancestor.selection.loc;
9 | }
10 | if (ancestor.type === 'ROOT' && ancestor.operationDefinition) {
11 | return ancestor.operationDefinition.loc;
12 | }
13 | return null;
14 | };
15 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/get-position-at-end-of-location.ts:
--------------------------------------------------------------------------------
1 | import { type Location } from 'graphql';
2 |
3 | import { DOCUMENT_EDITOR_ID } from '@pathfinder-ide/shared';
4 |
5 | import { type MonacoIPosition, getMonacoEditor } from '@pathfinder-ide/stores';
6 |
7 | export const getPositionAtEndOfLocation = ({
8 | location,
9 | newTextLength,
10 | }: {
11 | location: Location;
12 | newTextLength: number;
13 | }): MonacoIPosition => {
14 | const locationEndPosition = getMonacoEditor({ editorId: DOCUMENT_EDITOR_ID })
15 | ?.getModel()
16 | ?.getPositionAt(location.end) as MonacoIPosition;
17 |
18 | const position = {
19 | lineNumber: locationEndPosition.lineNumber,
20 | column: locationEndPosition.column + newTextLength,
21 | };
22 | return position;
23 | };
24 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/get-previous-ancestor.ts:
--------------------------------------------------------------------------------
1 | import type {
2 | AncestorArgument,
3 | AncestorTypes,
4 | AncestorsArray,
5 | } from '../compass-store.types';
6 |
7 | export const getPreviousAncestor = ({
8 | ancestors,
9 | target,
10 | }: {
11 | ancestors: AncestorsArray;
12 | target: AncestorTypes;
13 | }) => {
14 | const index = ancestors.findIndex((a) => a === target);
15 |
16 | return ancestors[index - 1] as Exclude;
17 | };
18 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/get-range-from-string-in-active-definition.ts:
--------------------------------------------------------------------------------
1 | import type { MonacoEditorITextModel, MonacoIRange } from '@pathfinder-ide/stores';
2 |
3 | import { getActiveDefinitionRange } from './get-active-definition-range';
4 |
5 | export const getRangeFromStringInActiveDefinition = ({
6 | model,
7 | string,
8 | }: {
9 | model: MonacoEditorITextModel;
10 | string: string;
11 | }): MonacoIRange | null => {
12 | const activeDefinitionRange = getActiveDefinitionRange();
13 |
14 | if (model && activeDefinitionRange) {
15 | const matches = model.findMatches(
16 | string,
17 | activeDefinitionRange,
18 | false,
19 | false,
20 | null,
21 | true,
22 | );
23 |
24 | // console.log('matches', { matches, string })
25 |
26 | if (matches.length === 1) {
27 | return matches[0].range;
28 | }
29 | }
30 |
31 | return null;
32 | };
33 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/get-root-ancestor.ts:
--------------------------------------------------------------------------------
1 | import type { AncestorRoot, AncestorsArray } from '../compass-store.types';
2 |
3 | export const getRootAncestor = ({ ancestors }: { ancestors: AncestorsArray }) => {
4 | return ancestors[0] as AncestorRoot;
5 | };
6 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/get-selected-arguments-count.ts:
--------------------------------------------------------------------------------
1 | import type { AncestorField } from '../compass-store.types';
2 |
3 | export const getSelectedArgumentsCount = ({
4 | previousAncestor,
5 | }: {
6 | previousAncestor: AncestorField;
7 | }): number => {
8 | if (
9 | previousAncestor.selection &&
10 | 'arguments' in previousAncestor.selection &&
11 | previousAncestor.selection.arguments
12 | ) {
13 | return previousAncestor.selection.arguments.length;
14 | }
15 | return 0;
16 | };
17 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/get-variable-definitions-count.ts:
--------------------------------------------------------------------------------
1 | import { Kind } from 'graphql';
2 |
3 | import { graphQLDocumentStore } from '@pathfinder-ide/stores';
4 |
5 | export const getVariableDefinitionsCount = (): number => {
6 | const activeDocumentEntry = graphQLDocumentStore.getState().activeDocumentEntry;
7 |
8 | if (
9 | activeDocumentEntry?.node.kind === Kind.OPERATION_DEFINITION &&
10 | activeDocumentEntry.node.variableDefinitions
11 | ) {
12 | return activeDocumentEntry.node.variableDefinitions.length;
13 | }
14 | return 0;
15 | };
16 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/has-sibling-selections.ts:
--------------------------------------------------------------------------------
1 | import type { AncestorTypes } from '../compass-store.types';
2 |
3 | export const hasSiblingSelections = ({
4 | mode,
5 | previousAncestor,
6 | }: {
7 | mode: 'ADD' | 'REMOVE';
8 | previousAncestor: AncestorTypes;
9 | }): boolean => {
10 | const greaterThan = mode === 'ADD' ? 0 : 1;
11 | if (
12 | (previousAncestor.type === 'INLINE_FRAGMENT' || previousAncestor.type === 'FIELD') &&
13 | previousAncestor.selection &&
14 | 'selectionSet' in previousAncestor.selection &&
15 | previousAncestor.selection.selectionSet
16 | ) {
17 | return previousAncestor.selection.selectionSet.selections.length > greaterThan;
18 | }
19 | if (
20 | previousAncestor.type === 'ROOT' &&
21 | previousAncestor.operationDefinition &&
22 | 'selectionSet' in previousAncestor.operationDefinition &&
23 | previousAncestor.operationDefinition.selectionSet
24 | ) {
25 | return (
26 | previousAncestor.operationDefinition.selectionSet.selections.length > greaterThan
27 | );
28 | }
29 | return false;
30 | };
31 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass-store/utils/unwrap-non-null-argument-type.ts:
--------------------------------------------------------------------------------
1 | import { GraphQLArgument, GraphQLInputType, isNonNullType } from 'graphql';
2 |
3 | export const unwrapNonNullArgumentType = ({
4 | argumentType,
5 | }: {
6 | argumentType: GraphQLArgument['type'];
7 | }): GraphQLInputType => {
8 | if (isNonNullType(argumentType)) {
9 | return argumentType.ofType;
10 | }
11 | return argumentType;
12 | };
13 |
--------------------------------------------------------------------------------
/packages/react/src/compass/compass.css.ts:
--------------------------------------------------------------------------------
1 | import { style } from '@pathfinder-ide/style';
2 |
3 | export const compassClass = style({
4 | position: 'relative',
5 | height: '100%',
6 | width: '100%',
7 | overflow: 'hidden',
8 | });
9 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/argument/argument.css.ts:
--------------------------------------------------------------------------------
1 | import { contract, style } from '@pathfinder-ide/style';
2 |
3 | export const argumentClass = style({
4 | display: 'flex',
5 | position: 'relative',
6 | paddingLeft: 16,
7 |
8 | selectors: {
9 | '&::before': {
10 | content: '',
11 | position: 'absolute',
12 | top: 10,
13 | left: 2,
14 | height: 1,
15 | width: 6,
16 | backgroundColor: contract.color.neutral[4],
17 | },
18 | },
19 | });
20 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/argument/argument.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | type AncestorArgument,
3 | type AncestorsArray,
4 | generateSelectionBreadcrumbsFromAncestors,
5 | } from '../../compass-store';
6 |
7 | import { Details } from '../details';
8 |
9 | import { argumentClass } from './argument.css';
10 |
11 | export const Argument = ({ ancestors }: { ancestors: AncestorsArray }) => {
12 | const { argument, selection } = ancestors[ancestors.length - 1] as AncestorArgument;
13 |
14 | return (
15 |
16 | undefined}
21 | type={argument}
22 | variant={'ARGUMENT'}
23 | />
24 |
25 | );
26 | };
27 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/argument/index.ts:
--------------------------------------------------------------------------------
1 | export { Argument } from './argument';
2 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/arguments/index.ts:
--------------------------------------------------------------------------------
1 | export { Arguments } from './arguments';
2 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/collapse-control/collapse-control.css.ts:
--------------------------------------------------------------------------------
1 | import { contract, recipe } from '@pathfinder-ide/style';
2 |
3 | export const collapseControlClass = recipe({
4 | base: {
5 | height: contract.space[20],
6 | width: contract.space[20],
7 | transformOrigin: 'center',
8 | },
9 | variants: {
10 | isExpanded: {
11 | true: {
12 | transform: 'rotate(0deg)',
13 | },
14 | false: {
15 | transform: 'rotate(-90deg)',
16 | },
17 | },
18 | },
19 | });
20 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/collapse-control/collapse-control.tsx:
--------------------------------------------------------------------------------
1 | import { IconButton } from '../../../components/icon-button';
2 | import { collapseControlClass } from './collapse-control.css';
3 |
4 | export const CollapseControl = ({
5 | isExpanded,
6 | setIsExpanded,
7 | title,
8 | }: {
9 | isExpanded: boolean;
10 | setIsExpanded: React.Dispatch>;
11 | title: string;
12 | }) => {
13 | return (
14 |
15 | setIsExpanded(!isExpanded)}
17 | iconName="Chevron"
18 | onSurface={1}
19 | title={title}
20 | size="small"
21 | />
22 |
23 | );
24 | };
25 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/collapse-control/index.ts:
--------------------------------------------------------------------------------
1 | export { CollapseControl } from './collapse-control';
2 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/details-actions/details-actions.css.ts:
--------------------------------------------------------------------------------
1 | import { recipe, shared, style } from '@pathfinder-ide/style';
2 |
3 | export const detailsActionsClass = recipe({
4 | base: {
5 | transition: `all .35s ${shared.transitions.authenticMotion}`,
6 | },
7 |
8 | variants: {
9 | showActions: {
10 | true: {
11 | visibility: `visible`,
12 | opacity: 1,
13 | },
14 | false: {
15 | visibility: `hidden`,
16 | opacity: 0,
17 | },
18 | },
19 | },
20 | });
21 |
22 | export const detailsActionsControlsClass = style({
23 | display: `flex`,
24 | gap: 2,
25 | alignContent: `center`,
26 | });
27 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/details-actions/index.ts:
--------------------------------------------------------------------------------
1 | export { DetailsActions } from './details-actions';
2 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/details/index.ts:
--------------------------------------------------------------------------------
1 | export { Details } from './details';
2 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/field/index.ts:
--------------------------------------------------------------------------------
1 | export { Field } from './field';
2 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/fields/fields.tsx:
--------------------------------------------------------------------------------
1 | import { GraphQLFieldMap, SelectionNode } from 'graphql';
2 |
3 | import { type AncestorsArray, findSelection } from '../../compass-store';
4 |
5 | import { Field } from '../field';
6 |
7 | export const Fields = ({
8 | ancestors,
9 | fields,
10 | parentSelections,
11 | }: {
12 | ancestors: AncestorsArray;
13 | // eslint-disable-next-line @typescript-eslint/no-explicit-any
14 | fields: GraphQLFieldMap;
15 | parentSelections: ReadonlyArray;
16 | }) => {
17 | return (
18 | <>
19 | {Object.keys(fields).map((f) => (
20 |
35 | ))}
36 | >
37 | );
38 | };
39 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/fields/index.ts:
--------------------------------------------------------------------------------
1 | export { Fields } from './fields';
2 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/index.ts:
--------------------------------------------------------------------------------
1 | export { Argument } from './argument';
2 |
3 | export { QuickDocs } from './quick-docs';
4 |
5 | export { RootOperation } from './root-operation';
6 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/indicator-leaf/index.ts:
--------------------------------------------------------------------------------
1 | export { IndicatorLeaf } from './indicator-leaf';
2 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/indicator-leaf/indicator-leaf.css.ts:
--------------------------------------------------------------------------------
1 | import { contract, style } from '@pathfinder-ide/style';
2 |
3 | export const indicatorLeafClass = style({
4 | height: contract.space[20],
5 | width: contract.space[20],
6 | display: 'flex',
7 | justifyContent: 'center',
8 | alignItems: 'center',
9 | });
10 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/indicator-leaf/indicator-leaf.tsx:
--------------------------------------------------------------------------------
1 | import { Icon } from '../../../components';
2 |
3 | import { indicatorLeafClass } from './indicator-leaf.css';
4 |
5 | export const IndicatorLeaf = () => {
6 | return (
7 |
8 |
9 |
10 | );
11 | };
12 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/list-item/index.ts:
--------------------------------------------------------------------------------
1 | export { ListItem } from './list-item';
2 |
3 | export type { ListItemTypeTypes, ListItemVariants } from './list-item.types';
4 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/list-item/list-item.types.ts:
--------------------------------------------------------------------------------
1 | import type {
2 | GraphQLArgument,
3 | GraphQLField,
4 | GraphQLInputObjectType,
5 | GraphQLObjectType,
6 | } from 'graphql';
7 |
8 | import type { AncestorsArray } from '../../compass-store';
9 |
10 | export type ListItemVariants = 'FIELD' | 'INLINE_FRAGMENT' | 'INPUT_OBJECT' | 'ARGUMENT';
11 |
12 | export type ListItemTypeTypes =
13 | // eslint-disable-next-line @typescript-eslint/no-explicit-any
14 | GraphQLField | GraphQLArgument | GraphQLInputObjectType | GraphQLObjectType;
15 |
16 | type ListItemBaseProps = {
17 | ancestors: AncestorsArray;
18 | isSelected: boolean;
19 | type: ListItemTypeTypes;
20 | variant: ListItemVariants;
21 | };
22 |
23 | type ListItemWithCollapserProps = {
24 | collapsibleContent?: {
25 | arguments?: React.ReactNode;
26 | renderChildFields?: () => React.ReactNode;
27 | };
28 | };
29 |
30 | export type ListItemProps = ListItemBaseProps & ListItemWithCollapserProps;
31 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/quick-docs/index.ts:
--------------------------------------------------------------------------------
1 | export { QuickDocs } from './quick-docs';
2 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/quick-docs/quick-docs.tsx:
--------------------------------------------------------------------------------
1 | import { TertiaryPane, useSchemaDocumentationStore } from '../../../schema-documentation';
2 |
3 | import { quickDocsClass } from './quick-docs.css';
4 |
5 | export const QuickDocs = () => {
6 | const activeTertiaryPane = useSchemaDocumentationStore.use.activeTertiaryPane();
7 |
8 | return (
9 |
14 | {activeTertiaryPane && }
15 |
16 | );
17 | };
18 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/root-operation/index.ts:
--------------------------------------------------------------------------------
1 | export { RootOperation } from './root-operation';
2 |
--------------------------------------------------------------------------------
/packages/react/src/compass/components/union/index.ts:
--------------------------------------------------------------------------------
1 | export { Union } from './union';
2 |
--------------------------------------------------------------------------------
/packages/react/src/compass/index.ts:
--------------------------------------------------------------------------------
1 | export { Compass } from './compass';
2 |
--------------------------------------------------------------------------------
/packages/react/src/components/action-execute-subscription/index.ts:
--------------------------------------------------------------------------------
1 | export { ActionExecuteSubscription } from './action-execute-subscription';
2 |
--------------------------------------------------------------------------------
/packages/react/src/components/action-execute/action-execute.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | executeOperation,
3 | useGraphQLDocumentStore,
4 | useSchemaStore,
5 | } from '@pathfinder-ide/stores';
6 |
7 | import { Button } from '../button';
8 |
9 | export const ActionExecute = () => {
10 | const activeDocumentEntry = useGraphQLDocumentStore.use.activeDocumentEntry();
11 | const documentNotifications = useGraphQLDocumentStore.use.documentNotifications();
12 |
13 | const isExecuting = useSchemaStore.use.isExecuting();
14 |
15 | const shouldBeDisabled =
16 | !activeDocumentEntry || documentNotifications.length > 0 || isExecuting;
17 |
18 | return (
19 |