- [HotFix] Need to bundle
@faker-js
into extension
- Add changelog GitHub Action to ensure a changelog entry is there for every PR
- Fix error locations for
INVALID_GRAPHQL
errors. Workebnch now tries to rebuild the source schema from the error and then uses theerror.nodes.location
for the VS Code diagnostic. - Fix a small edge case where a user could use a completion action to add Apollo Federation directives that updates the wrong editor. The correct schema is now displayed to the user and then updated.
- Fix relative path references for files and operation viewer
- When custom mocks fail to load, the error is now printed to the Apollo Workbench Output panel
- Fix
apolloApiUrl
setting to work with allrover
commands. This is primarily for internal Apollo debugging purposes against pre-prod environments of GraphOS.
- Create
graphRef
setting - when using the play button to start a design locally,rover dev
needs to pass a graph ref to an enterprise graph in GraphOS. This setting enables a user to set the name of their graph for the extension to work with. - Fix subgraph mock reload - dynamic urls introduced in
3.3.6
ended up breaking mocks because the supergraph composition was configured for the old ports. Rather than manage the router config, we simply store the subgraph port start so that it is dynamically created only on start. The created port is then re-used for all restarts of the subgraph mocks.
- Introduced auto upload to VS Code marketplace.
- Fix taken ports for subgraphs by setting
port: 0
- Temporary workbench file in
.apollo-workbench
folder contains dynamicsubgraph_url
- Mocked
subgraph_url
is printed to output window
- Temporary workbench file in
- Set
APOLLO_ROVER_DEV_COMPOSITION_VERSION
whenfederation_version
is set to={major}.{minor}.{patch}
in config file - PR#175 - Thank you to @lleadbet
- PR#173 - Thank you @dimaMachina
- PR#152 - includes eslint package updates
Note - Versions 3.3.0-3.3.5 were skipped due to old release tokens no longer working
- Enable setting Router Version in VSCode settings
routerVersion
- Better support
subgraph_url
to load read-only schema - Create
subgraph_url
watcher to ping changes- Introduce settings
enableSubgraphUrlWatcher
andsubgraphWatcherPingInterval
to allow a user to disable/enable the watcher and set the interval the watcher pingssubgraph_url
for updates. - Any updates in the watcher will trigger refreshing composition for that design file
- Introduce settings
- Fix #168 - fix "openFolder" command. It needed to include "vscode.openFolder".
- Fix #162 - operations with variabels in the design were being copied to the temporary wbfile used for composition
- Fix start design from operation - auto-start
rover dev
and pretty print document into sandbox on open
- Forward all headers sent to the router to any mocked subgraph. All header values will be exposed on the
context
in resolvers to be accessed in custom mocks - Support
apollo-workbench.routerConfigFile
for a custom router configuration file to pass torover dev
- Hot fix for
schema is undefined
when starting up a design
- Addresses issue #164 - Custom mocks now supports simple resolvers. Default custom mocks now have a simple example of fetch with
catFacts
for anyProduct
.__resolveReference
for any entity can also be defined and this will override the custom generated resolver for the mocks. - Bundle @faker-js into custom mocks. Default custom mocks have example for
Product.id
- Hot reload mocks while
rover dev
is running
- Normalize paths so extension works on Windows - verified on Windows 11
- Add prompts for missing rover installation, ELv2 prompt and config auth. Terminal windows are also created with the commands for the user.
- Fix bundling pre-loaded .graphql files into extension
- Rover commands now favor
--profile
vs usingAPOLLO_KEY
. This can be set inapollo-workbench.roverConfigProfile
of your VS Code settings. - Reintroduced "Example Designs" that users don't have to login to try out. They open in read only and are copied locally when you want to edit the files.
- Resolving file paths has been centralized through utils.uri with a fix for relative path definitions.
- Fix
rover dev
when operations have argument variables present. We now use the sanitized config file process that we use forrover supergraph compose
to strip theoperations
from the config file that is passed torover dev
. - Add GraphOS Signup and clarify login row for GraphOS view
- Have schema design files created in a design folder. Without the folder, creating a subgraph with the same name as another schema.graphql file in the folder will overwrite the schema.
- Fix mocks staying open on ports.
rover dev
sessions will be stopped before any attempted start - Enable command to refresh Apollo sandbox. We don't have a stable way to know when
rover dev
is actually finished, we just wait 5s (which should cover most scenarios). - Add RegEx to design file creations to prevent '#' from file names. We'll adjust the RegEx expression as issues arrise from usage
- Fix subgraph mocking and re-introduce custom mocks. Added supergraph config options:
schema:
mocks:
enabled: true
customMocks: ./subgraph-mocks.js
- Enable mocking by default for newly added subgraphs
- Migrate to
rover --format
instead of output (deprecated) - Switching federation versions can be done directly in the file, or by clicking the version in Workbench
- Multiple bug fixes
- Fix
Converting circular structure to JSON --> starting at object with constructor 'B4' | property 'command' -> object with constructor 'Object' | property 'arguments' -> object with constructor 'Array' --- index 0 closes the circle
error when clicking a graph in the "GRAPHOS SUPERGRAPHS" view to load operations - Fix Start graph locally with
rover dev
using the config file directly
This release of Apollo Workbench
- No more JSON blog in
.apollo-workbench
files - Workbench now uses theyaml
file used by the Apollo Router - All
@apollo/...
libraries associated with Federation have been removed. Apollo Workbench now just usesrover
.- Starting a design locally now uses
rover dev
and Apollo Explorer- Apollo Explorer is exposed inside extension - operation building and query plan viewing are in Explorer now.
- Starting a design locally now uses
- Federation 2 support
- Support for
@link
and all Federation directives with quick actions
- Support for
- Operations associated with designs support an associated image by a file pointer or
https
url
A number of breaking changes were made to simplify the workbench code base. Various functionality has begun to migrate to rover
and with a smaller codebase, workbench will be more maintainable. If there are features missing that you previously used, please open an issue to start a community conversation around it being re-introduced .
-
Changed workbench design files from
.apollo-workbench
to theyaml
file used by the Apollo Router forrover supergraph compose
. -
Remove Federation 1 support. Downgrade to Workbench 2.x to use Federation 1
-
Removed "export project" capabilities in favor of
rover template
features -
Removed "mocking" capabilities in favor of
rover dev
feature -
Removed export of resolvers because
__resolveReference
isn't always required with Federation 2
- Federation 2 Alpha support
- Create a new Apollo Studio graph from a workbench design
- Export project capabilities for any design
- Support multiple workbench design files with errors and context
- Workbench file upgrades for feature work (backwards compatible)
- Mocks engine overhaul
- Upgrade to Apollo Server 3.0
- Use Apollo Sandbox as default with auto-open url
- Introduce setting
apollo-workbench.openSandboxOnStartMocks
to disable auto-open url
- Introduce setting
- Upgrade to latest @apollo/gateway/federation/query-plan packages
- UI feedback when starting up multiple mocked subgraphs (tested with 25 subgraphs)
- Local files are now synced into Workbench. This means if you delete a workbench file in VS Code, then switch back to the workbench extension, the design file will no longer exist
- This is how you delete a workbench file locally
- Filtered output to have a better structure
- Mocks don't work with schemas that define Apollo Federation Spec items (i.e.
Query._service
) - Wrong workbench file could be loaded due to different design subgraph schema being open while local tree refresh happens
- Type completion for arrays printed incorrectly
- Various
- Added support for fowarding headers from Gateway to downstream services while mocked
- Introduced
apollo-workbench.headersToForwardFromGateway
which takes an array of string values which will be used to copy header values from the Gateway's context to the requests sent to downstream services - This is meant to support various scenarios where downstream services require certain header values to be present
- Introduced
- When starting up mocks and using a remote URL that can't be found, display the output results in VSCode Output Panel
- Introduced Service/Schema settings
- Can view settings as a json file and save
- Setting visualized from the workbench file
- Introduced
autoUpdateSchemaFromUrl
toWorkbenchSchema
- Context menu (right click) functionality points at workbench file directly
- Can view settings as a json file and save
- New mocking capabilities along with remote development options
- Update schema from a given url
- If Apollo Federation Spec is not supported (meaning
query { _service { sdl } }
fails), an introspection query will be used
- If Apollo Federation Spec is not supported (meaning
- Conditionally mock any service/schema defined in workbench
- Ability to auto-update a given service/schema with mocks running
- You may want to use this if are developing a service that must be started to provide it's schema (like Ruby or Kotlin). This would allow you to see changes as you develop that service in your mocked gateway running locally along with any composition errors in the problems panel
- Added
apollo-workbench.tlsRejectUnauthorized
to the available settings to support gateway sending requests to remote urls where an cert is used that can't be verified. This allows you to specifically toggleprocess.env.NODE_TLS_REJECT_UNAUTHORIZED
as needed; by defaultNODE_TLS_REJECT_UNAUTHORIZED=0
- Update schema from a given url
- Changed menu options and ordering for Current Workbench Services
- Changed name of TreeView from "Current Workbench Schemas" to "Current Workbench Services"
- Upgrade Visual Indicator for loading workbench files
- Usage of
yield
to unblock vscode extension ui thread fromcomposeAndValidate
🎉
- Local development mocking toggle options implemented
- Needs docs
- Can have portions of graph point at specific urls, others mocked
- Currently no auth/header options available
- Provide visual indicators of what is going on during composition and loading of workbench file (large schemas can take a second to load)
composeAndValidate
from@apollo/federation
is blocking the vscode extension ui thread 🐛
- Support composite keys in intellisense 🎉
- CSDL file not refreshing properly. Moved to not use openTextDocument as VS Code pulls from a cache instead of consitently calling the
FileProvier.readFile
- Added new icons
- Pretty print operations
- Intellisense takes along time to load with large generated csdl
- Excessive calls to
getText
in csdlParser removed
- Excessive calls to
- General stability across basic functions:
- Getting started
- Streamlined creating new folder
- Enter API key has feedback
- Creating a workbench file from multiple sources
- New (blank)
- From Apollo Studio Graph
- From Example Graph
- Rename workbench files
- Composition now updates CSDL visible if error
- Studio graphs loading
- Enable loading operations when clicking on any graph
- Enable setting to change days for traces fetched from Apollo Studio
- Studio Operations Viewing
- Open edit-only view of graphql operations from Studio when clicking on a row in graph loaded operations
- Getting started
- Open any fodler
- Intellisense for writing queries
Extension now utilizes a file provider and workbench schema/query/queryplan files are no longer created in a .workbench
folder. Any changes to a local schema file (that have not been synced to the workbench file) in previous extension versions will not update the workbench file. It is recommended to delete any .workbench
files
- Moved from chokidar to using a VSCode file provider
- Added Getting Started section to local schema files tree, auto-preview markdown files for getting started
- Mocks are no longer automatically started as they could linger in the background of a vscode window that had the extension opened at one point. Start/Stop commands have been introduced to toggle mocking
- Intellisense does not currently recognize composite keys or multiple keys
- Composition Errors sometimes don't point at the correct location in the document
- Intellisense type completion is currently missing from writing operations, to be added back in shortly
- Cache csdl parsing - was taking a long time to load for large schemas
- Add graphql-parser functions for reading available type/extension/scalar/enum/interface definitions when developing
- Added better location/type mapping
- Hide
.workbench
folder and associated files into background - Introduce rename schema functionality
- Introduce duplicate workbench file functionlity
- Simplify context/menu items
- Removed all buttons from schema/operaitons for currently loaded workbench (with the exception of opening query plan)
- Centralized options to right click context items
- Moved destructive actions to a new group to add line separtation
- [MVP] - Added Completion Item provider for available type extensions from CSDL 🎉
- Doesn't show extension options for what is defined in open service/schema file
- Future improvement could be to provide these as options that just move the cursor to the given position
- [BUG] Currently doesn't support composite keys
- Doesn't show extension options for what is defined in open service/schema file
- [MVP] - Added preloaded workbench example file
Initial Beta Release
- Apollo Studio Integration
- Enter user API key to load accounts - must currently select 1 account at a time
- No "switch account" button, have to logout and log back in
- Load graphs and variants for a given account
- Load gql operations for a given graph
- Create workbench file from a given graph and graphVariant
- Create gql operation in current workbench from Studio operation
- Enter user API key to load accounts - must currently select 1 account at a time
- Workbench
- Mock schemas by running an AS instance for each schema defined in the workbench
- Introduced
shouldMock
in the workbench file schemas for future support of pointing at prod/local urls to support scenarios like Kotlin GraphQL code first sdl
- Introduced
- ApolloGateway extension where
loadServiceDefinitions
points at the workbench file to compose - Composition errors are logged to vscode.Diagnostics in Problems panel
- Query plan generation using Rust wasm can be viewed for any opertion with a composed graph
- Mock schemas by running an AS instance for each schema defined in the workbench