Skip to content

feat: update schemas subgraph to test#130

Open
dls-graph-schema-federator[bot] wants to merge 1 commit intomainfrom
schemas-test
Open

feat: update schemas subgraph to test#130
dls-graph-schema-federator[bot] wants to merge 1 commit intomainfrom
schemas-test

Conversation

@dls-graph-schema-federator
Copy link
Contributor

Repository

Subgraph maintainers

@DiamondLightSource/ulims

@github-actions
Copy link

@@ -192,6 +192,7 @@ scalar join__FieldSet
 enum join__Graph {
   INSTRUMENT_SESSIONS @join__graph(name: "instrument_sessions", url: "https://instrument-sessions.diamond.ac.uk/api/graphql")
   SAMPLES @join__graph(name: "samples", url: "https://sample-information.diamond.ac.uk/api/graphql")
+  SCHEMAS @join__graph(name: "schemas", url: "https://schemas.diamond.ac.uk/graphql")
   WORKFLOWS @join__graph(name: "workflows", url: "https://workflows.diamond.ac.uk/graphql")
 }
 
@@ -207,6 +208,32 @@ scalar JSON
 scalar JSONObject
   @join__type(graph: WORKFLOWS)
 
+"""A JSON schema"""
+type JSONSchema
+  @join__type(graph: SCHEMAS)
+{
+  """The identifier of the schema"""
+  id: String!
+
+  """A URL from which the schema can be accessed"""
+  url: String!
+
+  """The type of object the shema describes (if known)"""
+  type: String
+
+  """The title of the schema"""
+  title: String
+
+  """The version of the schema"""
+  version: String
+
+  """The instrument the schema was created for"""
+  instrument: String
+
+  """The description og the schema"""
+  description: String
+}
+
 scalar link__Import
 
 enum link__Purpose {
@@ -294,6 +321,7 @@ enum ProposalState
 type Query
   @join__type(graph: INSTRUMENT_SESSIONS)
   @join__type(graph: SAMPLES)
+  @join__type(graph: SCHEMAS)
   @join__type(graph: WORKFLOWS)
 {
   """Get a proposal by its number"""
@@ -322,6 +350,8 @@ type Query
 
   """Get a list of samples associated with a given instrument session"""
   samples(proposalNumber: Int!, instrumentSessionNumber: Int!, first: Int!, filter: SampleFilterInput! = {}, before: String = null, after: String = null, last: Int = null, orderBy: SampleOrder! = {}): SampleConnection! @join__field(graph: SAMPLES)
+  jsonSchema(url: String!): JSONSchema @join__field(graph: SCHEMAS)
+  jsonSchemas(type: String = null, instrument: String = null): [JSONSchema!]! @join__field(graph: SCHEMAS)
 
   """Get a single [`Workflow`] by proposal, visit, and name"""
   workflow(visit: VisitInput!, name: String!): Workflow! @join__field(graph: WORKFLOWS)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants