feat(catalog/gql): fixing some of the feedback from PR and updating namings

This commit is contained in:
blam
2020-09-17 14:45:40 +02:00
parent 2083d75f71
commit 6824411684
2 changed files with 9 additions and 13 deletions
+1 -1
View File
@@ -6,6 +6,6 @@ This is the Catalog GraphQL plugin.
It provides the `catalog` part of the GraphQL schema.
To register it with the GraphQL backend, be sure to follow the [Gettting Started](../graphql/README.md#getting-started) guide of the GraphQL plugin.
To register it with the GraphQL backend, be sure to follow the [Getting Started](../graphql/README.md#getting-started) guide of the GraphQL plugin.
<!-- TODO: Need to make the GraphQL plugin compatible with non forked repos >
+8 -12
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
const EntityMetadataFields = /* GraphQL */ `
const metadataFields = /* GraphQL */ `
name: String!
annotations: JSONObject!
annotation(name: String!): JSON
@@ -25,36 +25,32 @@ const EntityMetadataFields = /* GraphQL */ `
generation: Int!
`;
const EntityMetadata = /* GraphQL */ `
const schema = /* GraphQL */ `
scalar JSON
scalar JSONObject
interface EntityMetadata {
${EntityMetadataFields}
${metadataFields}
}
type DefaultEntityMetadata implements EntityMetadata {
${EntityMetadataFields}
${metadataFields}
}
type ComponentMetadata implements EntityMetadata {
${EntityMetadataFields}
${metadataFields}
# mock field to prove extensions working
relationships: String
}
type TemplateMetadata implements EntityMetadata {
${EntityMetadataFields}
${metadataFields}
# mock field to prove extensions working
updatedBy: String
}
<<<<<<< HEAD
# TODO: move this definition into plugin-scaffolder-graphql
=======
>>>>>>> 94d28cb5c81798c80b32bf4fa8d834cb873ec06a
type TemplateEntitySpec {
type TemplateEntitySpec {
type: String!
path: String
schema: JSONObject!
@@ -89,4 +85,4 @@ const EntityMetadata = /* GraphQL */ `
}
`;
module.exports = EntityMetadata;
export default schema;