Skip to content

Instantly share code, notes, and snippets.

@taras
Last active August 31, 2022 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taras/55202c0162033ba7edc5deff24ead6e8 to your computer and use it in GitHub Desktop.
Save taras/55202c0162033ba7edc5deff24ead6e8 to your computer and use it in GitHub Desktop.
{
"data": {
"meta": [
{
"name": "Component",
"count": 1,
"vertices": {
"owner": {
"name": "Group",
"field": "owner",
"count": 1,
"vertices": {}
},
"partOf": {
"name": "Component",
"field": "partOf",
"count": 1,
"vertices": {
"owner": {
"name": "Group",
"field": "owner",
"count": 1,
"vertices": {}
},
"consumes": {
"name": "API",
"field": "consumes",
"count": 2,
"vertices": {}
},
"provides": {
"name": "API",
"field": "provides",
"count": 2,
"vertices": {}
},
"dependencies": {
"name": "Resource",
"field": "dependencies",
"count": 1,
"vertices": {}
}
}
},
"consumes": {
"name": "API",
"field": "consumes",
"count": 3,
"vertices": {}
},
"subComponents": {
"name": "Component",
"field": "subComponents",
"count": 1,
"vertices": {
"owner": {
"name": "Group",
"field": "owner",
"count": 1,
"vertices": {}
},
"consumes": {
"name": "API",
"field": "consumes",
"count": 2,
"vertices": {}
},
"provides": {
"name": "API",
"field": "provides",
"count": 2,
"vertices": {}
},
"dependencies": {
"name": "Resource",
"field": "dependencies",
"count": 1,
"vertices": {}
}
}
},
"provides": {
"name": "API",
"field": "provides",
"count": 2,
"vertices": {}
},
"dependencies": {
"name": "Resource",
"field": "dependencies",
"count": 2,
"vertices": {}
}
}
}
]
}
}
interface Node {
id: ID!
typename: String!
}
type NodeEdge {
node: Node
cursor: String!
}
type NodeConnection {
count: Int
pageInfo: PageInfo
edges: [NodeEdge!]
}
type Vertex {
id: ID!
typename: String!
fields: JSON
computed: JSON
references: [VertexEntry]
}
type VertexEntry {
key: String!
value: Vertex!
}
type VertexEdge {
node: Vertex
cursor: String
}
type VertexConnection {
count: Int
pageInfo: PageInfo
edges: [VertexEdge!]
}
type Type {
name: String
count: Int
nodes: NodeConnection
vertices: VertexConnection
}
type Query {
meta: [Type]
}
> Component (X)
> owner: Group (X)
> partOf: Component (X)
> consumes: API (X)
> subComponents: Component (X)
> provides: API (X)
> Group (1,000,000)
> API (X)
> Resource (X)
> Group (X)
@cowboyd
Copy link

cowboyd commented Aug 31, 2022

scenarios are represented as a set of graphql queries using the following schema.

scalar JSON

input CreateInput {
  typename: String!
  preset: JSON
}

type Mutation {
  createOne(typename: String!, preset: JSON): Node!
  createMany(inputs: [CreateInput!]!): [Node!]!
}

e.g.

mutation {
  createMany(inputs: [{
    typename: "Component",
    preset: { name: "Backstage" }
  }])
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment