Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@apollo/explorer
Advanced tools
This repo hosts the source for Apollo Studio's Embeddable Explorer
You can download the @apollo/explorer npm package with npm install @apollo/explorer
. Then, you can import the ApolloExplorer class or ApolloExplorer component like so:
import { ApolloExplorer } from '@apollo/explorer';
import { ApolloExplorer } from '@apollo/explorer/react';
When you call the EmbeddedExplorer constructor with a target
of an html div you have in your app, the Explorer will show up in an iframe in that element. Check out all the configuration options for your graph.
import { ApolloExplorer } from '@apollo/explorer/react';
function App() {
return (
<ApolloExplorer
graphRef='acephei@current',
endpointUrl='https://acephei-gateway.herokuapp.com',
initialState={{
document: `query Example {
me {
id
}
}`,
variables: {
test: 'abcxyz',
},
displayOptions: {
showHeadersAndEnvVars: true,
},
}}
/>
);
}
import { ApolloExplorer } from '@apollo/explorer';
function App() {
...
new ApolloExplorer({
target: '#embeddableExplorer',
graphRef: 'acephei@current',
endpointUrl: 'https://acephei-gateway.herokuapp.com',
initialState: {
document: `query Example {
me {
id
}
}`,
variables: {
test: 'abcxyz',
},
displayOptions: {
showHeadersAndEnvVars: true,
},
},
})
...
}
cd
into packages/explorer
and run npm run build:umd
to build umd files where EmbeddedExplorer is exposed on window.
Open examples/embeddedExplorer/localDevelopmentExample.html
to test your changes. (if origin is not set, run localDevelopmentExample.html from Live Server
)
Install the Live Server
extension on VSCode, then go to localDevelopmentExample.html
and click 'Go Live'
cd
into packages/explorer
and run npm run build:cjs-esm
to build cjs & esm files where ApolloExplorer & ApolloExplorer React are named exports.
We have a React example app that uses our ApolloExplorer React component to render the embedded Explorer located in src/examples/react-example. To run this example, npm run build
and npm run start
in react-example
. Make sure you delete the .parcel-cache folder before you rebuild for new changes. (TODO remove parcel caching)
FAQs
This repo hosts the source for Apollo Studio's Embeddable Explorer
The npm package @apollo/explorer receives a total of 0 weekly downloads. As such, @apollo/explorer popularity was classified as not popular.
We found that @apollo/explorer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.