Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

NEBULA-1385: Add initialState config for sandbox #136

Merged
merged 4 commits into from Jun 29, 2022

Conversation

William010x
Copy link
Contributor

@William010x William010x commented Jun 27, 2022

Context

JIRA

What changed

  • Added initialState with document, headers and variables for embeddable sandbox

How to test

  • Checkout to william/sandbox-initial-state on embeddable-explorer repo
  • Checkout to william/explorer-everywhere/sandbox-initial-state on studio-ui repo
  • Change constants.ts to EMBEDDABLE_SANDBOX_URL = 'https://embed.apollo.local:3000/sandbox/explorer';
  • Add an initial state to the embed configuration, for example:
initialState: {
document: `query Test {
  me {
    id
  }
}`,
variables: {
  test: 'abcxyz',
},
headers: {
  'key': 'value'
},
  • npm run build-sandbox:umd on embeddable-explorer
  • npm run start:embedded on studio-ui
  • Open localDevelopmentExample for embedded Sandbox on Go Live
  • Close all tabs to see initial state

Corresponding studio-ui PR

@changeset-bot
Copy link

changeset-bot bot commented Jun 27, 2022

🦋 Changeset detected

Latest commit: c6b246c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@apollo/explorer Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 27, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c6b246c:

Sandbox Source
npm-embeddable-explorer Configuration

Copy link
Contributor

@mayakoneval mayakoneval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome! lgtm. This should be a minor (feature add)

@William010x William010x merged commit 62d0423 into main Jun 29, 2022
@William010x William010x deleted the william/sandbox-initial-state branch June 29, 2022 15:47
@github-actions github-actions bot mentioned this pull request Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants