RiddlerGraphQL.Types.Journey (RiddlerGraphQL v0.1.0)

Copy Markdown View Source

The root fields a host adds to its own schema: JourneyQueries, the query fields, and JourneyMutations, the mutation fields, with JourneyPayload, what each mutation answers.

A host imports this module's types beside the types they use, then the two objects' fields into the root query and root mutation types it already has, next to its own fields:

import_types RiddlerGraphQL.Types.JSON
import_types RiddlerGraphQL.Types.Answer
import_types RiddlerGraphQL.Types.Finding
import_types RiddlerGraphQL.Types.Scope
import_types RiddlerGraphQL.Types.Journey

query do
  import_fields :journey_queries
end

mutation do
  import_fields :journey_mutations
end
Root fieldArgumentsAnswers
journeyid: ID!, draft: RiddlerJSONJourneyAnswer
startJourneypath: ID!, scope: JourneyScopeInput!JourneyPayload
submitJourneyjourney: ID!, screen: String!, outcome: String!, responses: RiddlerJSON!JourneyPayload
goBackjourney: ID!, screen: String!JourneyPayload

JourneyPayload has three fields: journey: ID!, the host's name for the Journey; answer: JourneyAnswer, null when the payload answers findings; and findings: [JourneyFinding!]!, empty when the host takes the mutation.