Skip to content

Commit

Permalink
feat: Unify typeDef definition between api and component
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jun 28, 2020
1 parent 68ec65e commit 2bb92b2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions plugins/gatsby-source-newrelic-sdk/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ exports.createSchemaCustomization = ({ actions, schema }) => {
const typeDefs = `
type NewRelicSdkComponent implements Node {
propTypes: [NewRelicSdkPropTypeDefinition!]!
typeDefs: [NewRelicSdkTypeDefinition]
}
type NewRelicSdkApi implements Node {
typeDefs: [NewRelicSdkTypeDefinition]
}
type NewRelicSdkPropTypeDefinition @dontInfer {
Expand Down Expand Up @@ -90,6 +95,17 @@ exports.createSchemaCustomization = ({ actions, schema }) => {
name: String!
type: String!
}
type NewRelicSdkTypeDefinition {
name: String!
properties: [NewRelicSdkTypeDefinitionProperty]
}
type NewRelicSdkTypeDefinitionProperty {
name: String!
description: String
type: String!
}
`;

createTypes([propTypeMeta, typeDefs]);
Expand Down

0 comments on commit 2bb92b2

Please sign in to comment.