
Security News
Static vs. Runtime Reachability: Insights from Latio’s On the Record Podcast
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
@appsignal/apollo-server
Advanced tools
 
@appsignal/apollo-server
The AppSignal for Node.js integration for Apollo GraphQL (apollo-server
) v2.0.0+.
⚠️ This package is no longer required for AppSignal for Node.js version 3.0. If you use version 3.0 or newer in your app, please remove this package from your package.json
file.
First, sign up for an AppSignal account and add both the @appsignal/nodejs
and @appsignal/apollo-server
packages to your package.json
. Then, run yarn install
/npm install
.
You can also add these packages to your package.json
on the command line:
yarn add @appsignal/nodejs @appsignal/apollo-server
npm install --save @appsignal/nodejs @appsignal/apollo-server
You can then import and use the package in your app.
The module includes an Apollo Server plugin for automatically instrumenting the resolvers of your application.
// ENSURE APPSIGNAL IS THE FIRST THING TO BE REQUIRED/IMPORTED
// INTO YOUR APP!
const { Appsignal } = require("@appsignal/nodejs")
const { createApolloPlugin } = require("@appsignal/apollo-server")
// You can also use one of the apollo-server integrations here,
// e.g. `apollo-server-<integration>`. Note that you will also need to require
// the AppSignal integration seperately.
const { ApolloServer } = require("apollo-server")
const appsignal = new Appsignal({
active: true,
name: "<YOUR APPLICATION NAME>",
pushApiKey: "<YOUR API KEY>"
})
// The GraphQL schema
const typeDefs = gql`
type Query {
"A simple type for getting started!"
hello: String
}
`
// A map of functions which return data for the schema.
const resolvers = {
Query: {
hello: () => 'world',
},
}
const server = new ApolloServer({
typeDefs,
resolvers,
plugins: [createApolloPlugin(appsignal)]
})
server.listen().then(({ url }) => {
console.log(`🚀 Server ready at ${url}`);
})
NOTE: You must define an operation name for your query to get an action name in the Performance view of AppSignal.com. For example, query FetchData {}
would get the action name FetchData
on AppSignal.com. If no operation name is set, the query will be grouped under the action name [unknown graphql query]
.
Thinking of contributing to this repo? Awesome! 🚀
Please follow our Contributing guide in our documentation and follow our Code of Conduct.
Also, we would be very happy to send you Stroopwafles. Have look at everyone we send a package to so far on our Stroopwafles page.
Contact us and speak directly with the engineers working on AppSignal. They will help you get set up, tweak your code and make sure you get the most out of using AppSignal.
FAQs
 
The npm package @appsignal/apollo-server receives a total of 4 weekly downloads. As such, @appsignal/apollo-server popularity was classified as not popular.
We found that @appsignal/apollo-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers 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
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.