Repository: newrelic/newrelic-node-apollo-server-plugin (js)

Issue:
Default captureIntrospectionQueries to false
We could potentially verify but seems more likely customers will want these hidden than want them visible.

Given we are an 0.x release, we could potentially just do with a normal release or we can wait to the upcoming major release we know we are going to do to jump to 1.0.



Pull request description:
set captureIntrospectionQueries default to be false
<!--
Thank you for submitting a Pull Request.

This code is leveraged to monitor critical services. Please consider the following:
* Tests are required.
* Performance matters.
* Features that are specific to just your app are unlikely to make it in.

Please fill out the relevant sections as follows:
* Proposed Release Notes: Bulleted list of recommended release notes for the change(s).
* Links: Any relevant links for the change.
* Details: In-depth description of changes, other technical notes, etc.
-->

## Proposed Release Notes
 * Changes the default behavior of plugin to not capture introspection queries(captureIntrospectionQueries now defaults to false)

## Links
Closes #94

## Details


Patch:
diff --git a/README.md b/README.md
index 5ef01b7..3e33286 100644
--- a/README.md
+++ b/README.md
@@ -50,7 +50,7 @@ To override configuration, invoke the `createPlugin` function prior to passing t
 const createPlugin = require('@newrelic/apollo-server-plugin')
 const plugin = createPlugin({
   captureScalars: false,
-  captureIntrospectionQueries: true
+  captureIntrospectionQueries: false
 })
 
 // imported from supported module
@@ -97,7 +97,7 @@ Configuration may be passed into the `createPlugin` function to override specifi
 ```js
 const plugin = createPlugin({
   captureScalars: true,
-  captureIntrospectionQueries: false
+  captureIntrospectionQueries: true
 })
 ```
 
@@ -108,7 +108,7 @@ const plugin = createPlugin({
 
   **NOTE:** query/mutation resolvers will always be captured even if returning a scalar type.
 
-* `[captureIntrospectionQueries = true]` Enable capture of timings for an [IntrospectionQuery](https://graphql.org/graphql-js/utilities/#introspectionquery).
+* `[captureIntrospectionQueries = false]` Enable capture of timings for an [IntrospectionQuery](https://graphql.org/graphql-js/utilities/#introspectionquery).
 
 ### Transactions
 
diff --git a/lib/create-plugin.js b/lib/create-plugin.js
index 1358dbc..f1dbaec 100644
--- a/lib/create-plugin.js
+++ b/lib/create-plugin.js
@@ -60,9 +60,7 @@ function createPlugin(instrumentationApi, config = {}) {
   logger.info('Apollo Server plugin created.')
 
   config.captureScalars = config.captureScalars || false
-  config.captureIntrospectionQueries = config.captureIntrospectionQueries === false
-    ? false
-    : true
+  config.captureIntrospectionQueries = config.captureIntrospectionQueries || false
 
   logger.debug('Plugin configuration: ', config)
 


Test patch:
diff --git a/tests/integration/config-capture-introspection-queries.test.js b/tests/integration/config-capture-introspection-queries.test.js
index 80b0567..4951c9b 100644
--- a/tests/integration/config-capture-introspection-queries.test.js
+++ b/tests/integration/config-capture-introspection-queries.test.js
@@ -29,7 +29,7 @@ const queries = [
 
 setupApolloServerTests({
   suiteName: 'default',
-  createTests: createCaptureIntrospectionTests.bind(null, false)
+  createTests: createCaptureIntrospectionTests.bind(null, true)
 })
 
 setupApolloServerTests({