UNPKG

@valueflows/vf-graphql

Version:

Reference GraphQL implementation of the ValueFlows spec

142 lines (104 loc) 3.58 kB
// Generated by scripts/build.js - edit the *.gql file instead! module.exports = ` ## # # Proposal module # # Allows grouping of many intents (requests or offers) into a related proposal for actioning. # # @package vf-graphql # @since 2019-02-11 # ## """ Published requests or offers, sometimes with what is expected in return. """ type Proposal { id: ID! revisionId: ID! "An informal or formal textual identifier for a proposal. Does not imply uniqueness." name: String "The beginning time of proposal publication." hasBeginning: DateTime "The end time of proposal publication." hasEnd: DateTime "This proposal contains unit based quantities, which can be multiplied to create commitments; commonly seen in a price list or e-commerce." unitBased: Boolean "The date and time the proposal was created." created: DateTime "A textual description or comment." note: String "The intents which are part of this proposal." publishes: [Intent!]! "The reciprocal intents which are part of this proposal." reciprocal: [Intent!]! "The agents to whom this proposal is proposed." proposedTo: [Agent!]! } ## # API input and output types ## input ProposalCreateParams { "An informal or formal textual identifier for a proposal. Does not imply uniqueness." name: String "The beginning time of proposal publication." hasBeginning: DateTime "The end time of proposal publication." hasEnd: DateTime "This proposal contains unit based quantities, which can be multipied to create commitments; commonly seen in a price list or e-commerce." unitBased: Boolean "A textual description or comment." note: String "The date and time the proposal was created." created: DateTime # :TODO: should this be generated by the backend, or is it human-provided data? "The intents which are part of this proposal." publishes: [ID!]! "The reciprocal intents which are part of this proposal." reciprocal: [ID!] "The agents to whom this proposal is proposed." proposedTo: [ID!] } input ProposalUpdateParams { revisionId: ID! "An informal or formal textual identifier for a proposal. Does not imply uniqueness." name: String "The beginning date/time of proposal publication." hasBeginning: DateTime "The end time of proposal publication." hasEnd: DateTime "This proposal contains unit based quantities, which can be multipied to create commitments; commonly seen in a price list or e-commerce." unitBased: Boolean "A textual description or comment." note: String "The intents which are part of this proposal." publishes: [ID!]! "The reciprocal intents which are part of this proposal." reciprocal: [ID!] "The agents to whom this proposal is proposed." proposedTo: [ID!] } type ProposalResponse { proposal: Proposal! } type ProposalConnection { edges: [ProposalEdge!]! pageInfo: PageInfo! } type ProposalEdge { node: Proposal! cursor: String! } type Query { proposal(id: ID!): Proposal proposals(first: Int, after: String, last: Int, before: String): ProposalConnection! "List all proposals that are being listed as offers." offers(first: Int, after: String, last: Int, before: String): ProposalConnection! "List all proposals that are being listed as requests." requests(first: Int, after: String, last: Int, before: String): ProposalConnection! } type Mutation { createProposal(proposal: ProposalCreateParams!): ProposalResponse! updateProposal(proposal: ProposalUpdateParams!): ProposalResponse! deleteProposal(revisionId: ID!): Boolean! } `