123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- # Run codegen using: npm run generate
- # Make sure schema endpoint is accessible!
- schema:
- - https://query.joystream.org/graphql # Pioneer
- documents:
- - >
- query openingById($openingId: ID!) {
- workingGroupOpeningByUniqueInput(where: {id: $openingId}) {
- metadata {
- applicationDetails
- description
- hiringLimit
- expectedEnding
- shortDescription
- title
- }
- id
- rewardPerBlock
- stakeAmount
- unstakingPeriod
- }
- }
- - >
- query workerById($workerId: ID!) {
- workerByUniqueInput(where: {id: $workerId}) {
- membership {
- ...MemberFields
- }
- status {
- __typename
- }
- rewardPerBlock
- stake
- rewardAccount
- roleAccount
- stakeAccount
- }
- }
- fragment ForumCategoryFields on ForumCategory {
- id
- parentId
- title
- }
- fragment MemberFields on Membership {
- handle
- id
- controllerAccount
- rootAccount
- isVerified
- isFoundingMember
- isCouncilMember
- roles {
- id
- groupId
- status {
- ... on WorkerStatusActive {
- __typename
- }
- ... on WorkerStatusLeaving {
- __typename
- }
- ... on WorkerStatusLeft {
- __typename
- }
- ... on WorkerStatusTerminated {
- __typename
- }
- }
- isLead
- }
- }
- - >
- query applicationById($applicationId: ID!) {
- workingGroupApplicationByUniqueInput(where: {id: $applicationId}) {
- applicant {
- handle
- }
- openingId
- }
- }
- - >
- query memberById($memberId: ID!) {
- memberships(where: {id_eq: $memberId}) {
- ...MemberFields
- }
- }
- - >
- query memberByHandle($handle: String) {
- memberships(where: {handle_eq: $handle}) {
- ...MemberFields
- }
- }
- - >
- query membersByHandles($handles: [String!]) {
- memberships(where: {handle_in: $handles}) {
- ...MemberFields
- }
- }
- - >
- query workersByAccount($account: String!) {
- workers(where: {rewardAccount_eq: $account}) {
- id
- membership {
- ...MemberFields
- }
- }
- }
- - >
- query activeCouncilMembers {
- electedCouncils(where: {endedAtBlock_eq: null}) {
- councilMembers {
- member {
- ...MemberFields
- }
- }
- }
- }
- - >
- query forumThreadById($threadId: ID!) {
- forumThreadByUniqueInput(where: {id: $threadId}) {
- id
- title
- author {
- ...MemberFields
- }
- category {
- ...ForumCategoryFields
- }
- }
- }
- - >
- query postById($postId: ID!) {
- forumPostByUniqueInput(where: {id: $postId}) {
- id
- author {
- ...MemberFields
- }
- thread {
- id
- title
- author {
- ...MemberFields
- }
- category {
- ...ForumCategoryFields
- }
- }
- }
- }
- - >
- query getStorageNodes {
- storageBuckets(where: {dataObjectsCount_gt: 0}) {
- operatorMetadata {
- nodeEndpoint
- }
- }
- }
- - >
- query getStorageBagsByNodeEndpoint($nodeEndpoint: String!) {
- storageBuckets(where: {operatorMetadata: {nodeEndpoint_eq: $nodeEndpoint}}) {
- bags {
- storageBuckets {
- id
- }
- id
- }
- }
- }
- generates:
- ./src/qntypes.ts:
- plugins:
- - typescript
- - typescript-operations
- - typescript-graphql-request
|