Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Commit eb544bd

Browse files
committed
Merge branch 'main' into mlosier/update-cats-and-keywords
2 parents 09b0982 + 7ef006d commit eb544bd

File tree

11 files changed

+80
-52
lines changed

11 files changed

+80
-52
lines changed

.extended-webpackrc.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// import webpack from 'webpack';
2-
31
module.exports = {
42
resolve: {
5-
// .mjs needed for https://github.com/graphql/graphql-js/issues/1272
3+
// .mjs needed to fix for https://github.com/graphql/graphql-js/issues/1272
64
extensions: ['*', '.mjs', '.js', '.json', '.gql', '.graphql']
75
},
86
module: {

.github/workflows/release.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -170,18 +170,7 @@ jobs:
170170
- name: Setup Node.js
171171
uses: actions/setup-node@v1
172172
with:
173-
node-version: 10.x
174-
175-
- name: Download Cached Deps
176-
id: cache-node-modules
177-
uses: actions/cache@v1
178-
env:
179-
cache-name: node-modules
180-
with:
181-
path: ~/.npm
182-
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
183-
restore-keys: |
184-
${{ runner.os }}-${{ env.cache-name }}-
173+
node-version: 14
185174

186175
- name: Install dependencies
187176
run: npm ci
@@ -214,7 +203,7 @@ jobs:
214203
GIT_COMMITTER_NAME: "nr-opensource-bot"
215204
GIT_COMMITTER_EMAIL: "[email protected]"
216205
GITHUB_TOKEN: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
217-
run: npx semantic-release
206+
run: npx semantic-release@^18.0.0
218207

219208
- name: Re-enable "required_pull_request_reviews" branch protection
220209
id: enable-branch-protection

catalog/documentation.md

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -72,37 +72,7 @@ Renderers are simply React component classes with an additional static method, `
7272
Documentation is a little lacking at the moment but you _could_ drop your own renderer in today! Here's one you can try out that will link account IDs on account objects to the account page in APM.
7373
7474
Add this file to the `nerdlets/notebook-nerdlet/renderers` directory.
75-
76-
```javascript
77-
import React from 'react';
78-
79-
// Render account IDs as links to the account page in APM
80-
export default class AccountIdRenderer extends React.Component {
81-
static test(node) {
82-
let parent = node.__meta.parent;
83-
84-
if (!parent) return false;
85-
86-
let isAccountTypeObject =
87-
parent.__meta.typename == 'Account' ||
88-
parent.__meta.typename == 'AccountOutline';
89-
90-
return isAccountTypeObject && node.__meta.fieldName == 'id';
91-
}
92-
93-
render() {
94-
let accountId = this.props.node.value;
95-
return (
96-
<a
97-
target="_blank"
98-
href={`https://rpm.newrelic.com/accounts/${accountId}`}
99-
>
100-
Visit Account {accountId}
101-
</a>
102-
);
103-
}
104-
}
105-
```
75+
- https://github.com/newrelic/nr1-graphiql-notebook/tree/main/nerdlets/notebook-nerdlet/context-render-example.txt
10676
10777
Next, import this class into `nerdlets/notebook-nerdlet/renderers/render.js` and add it to the `RENDERERS` array.
10878
-151 KB
Loading
-161 KB
Loading

docs/CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
## [0.6.10](https://github.com/newrelic/nr1-graphiql-notebook/compare/v0.6.9...v0.6.10) (2021-11-12)
2+
3+
4+
### Bug Fixes
5+
6+
* error with gql import ([740903a](https://github.com/newrelic/nr1-graphiql-notebook/commit/740903afdd52942a7ba8d4e5507516c15f8773ac))
7+
8+
## [0.6.9](https://github.com/newrelic/nr1-graphiql-notebook/compare/v0.6.8...v0.6.9) (2021-11-12)
9+
10+
11+
### Bug Fixes
12+
13+
* issue with html tag in catalog documentation ([7dc818d](https://github.com/newrelic/nr1-graphiql-notebook/commit/7dc818dc933e8665e96199443c7184dcfd1a55b4))
14+
15+
## [0.6.8](https://github.com/newrelic/nr1-graphiql-notebook/compare/v0.6.7...v0.6.8) (2021-11-12)
16+
17+
18+
### Bug Fixes
19+
20+
* check for contextNode ([0b7f679](https://github.com/newrelic/nr1-graphiql-notebook/commit/0b7f6791fd28558b6e34d9a1059456e6b7b801df))
21+
* eslint issues ([f2069c1](https://github.com/newrelic/nr1-graphiql-notebook/commit/f2069c17e000f3a6ee59150fd663c1c9c7e2321e))
22+
23+
## [0.6.7](https://github.com/newrelic/nr1-graphiql-notebook/compare/v0.6.6...v0.6.7) (2021-11-12)
24+
25+
26+
### Bug Fixes
27+
28+
* reduce size of images for catalog ([d8b01f5](https://github.com/newrelic/nr1-graphiql-notebook/commit/d8b01f54147c078f26a06f2a31d969e3aa6b1750))
29+
30+
## [0.6.6](https://github.com/newrelic/nr1-graphiql-notebook/compare/v0.6.5...v0.6.6) (2021-11-12)
31+
32+
33+
### Bug Fixes
34+
35+
* remove deprecated paramter from TextField ([efd2021](https://github.com/newrelic/nr1-graphiql-notebook/commit/efd2021dbbc0ca15b00d3e755b4530802fc4b789))
36+
* use node 14 and speicifc version of semantic release ([233597a](https://github.com/newrelic/nr1-graphiql-notebook/commit/233597a3b7cd0068475e43435a2d88af60eab744))
37+
138
## [0.6.5](https://github.com/newrelic/nr1-graphiql-notebook/compare/v0.6.4...v0.6.5) (2021-05-07)
239

340

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import React from 'react';
2+
3+
// Render account IDs as links to the account page in APM
4+
export default class AccountIdRenderer extends React.Component {
5+
static test(node) {
6+
const parent = node.__meta.parent;
7+
8+
if (!parent) return false;
9+
10+
const isAccountTypeObject =
11+
parent.__meta.typename === 'Account' ||
12+
parent.__meta.typename === 'AccountOutline';
13+
14+
return isAccountTypeObject && node.__meta.fieldName === 'id';
15+
}
16+
17+
render() {
18+
const accountId = this.props.node.value;
19+
return (
20+
<a
21+
target="_blank"
22+
rel="noreferrer"
23+
href={`https://rpm.newrelic.com/accounts/${accountId}`}
24+
>
25+
Visit Account {accountId}
26+
</a>
27+
);
28+
}
29+
}

nerdlets/notebook-nerdlet/notebook-cell.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ export default class NotebookCell extends React.Component {
167167
<div className="notebook-cell-notes">
168168
<TextField
169169
style={{ marginBottom: '7px' }}
170-
multiline
171170
label="Notes"
172171
placeholder="e.g. Lorem Ipsum"
173172
value={this.state.notes}

nerdlets/notebook-nerdlet/results/query-document-context.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@ export function generate(queryDoc) {
1212
// value of that node in the augmented response. The context property
1313
// includes things like the argument the field was queried with.
1414
export function findFieldContext(contextNode, path) {
15-
if (Number.isInteger(last(path)))
15+
if (Number.isInteger(last(path))) {
1616
return findFieldContext(contextNode, path.slice(0, -1));
17-
if (path.length === 0) return contextNode.context || {};
17+
}
18+
if (path.length === 0) {
19+
if (contextNode && contextNode.context) {
20+
return contextNode.context;
21+
}
22+
return {};
23+
}
1824
const [nextField, remainingPath] = pop(path);
1925
const nextNode = contextNode.selectionSet[nextField];
2026
return findFieldContext(nextNode, remainingPath);

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)