Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The working groups API vs GraphQL representation #480

Closed
jodator opened this issue Apr 29, 2021 · 0 comments
Closed

The working groups API vs GraphQL representation #480

jodator opened this issue Apr 29, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request scope:integration Application integration with external APIs or tools scope:working-groups The "Working Groups" page and related featrues

Comments

@jodator
Copy link
Contributor

jodator commented Apr 29, 2021

We're going to call Working Groups extrinsic from the joystream node API. This means that we have to map a Working Group returned from the Hydra GraphQL server into the proper API namespace.

For instance to apply for a position in the membership Working Group the API call is:

api.tx.membershipWorkingGroup.applyOnPosition()

and for the storage it would be:

api.tx.storageWorkingGroup.applyOnPosition()

It looks like the Working Group's ID will hold the proper name of the Working Group:

type WorkingGroup @entity {
  "Working group id (currently === name)"
  id: ID!

  "Working group name"
  name: String! @unique

  "Working group current metadata"
  metadata: WorkingGroupMetadata

  "Current working group leader"
  leader: Worker

  "Workers that currently belong to the group or belonged to the group in the past"
  workers: [Worker!] @derivedFrom(field: "group")

  "All openings related to this group"
  openings: [WorkingGroupOpening!] @derivedFrom(field: "group")

  "Current working group budget (JOY)"
  budget: BigInt!
}

The other source of this might be Working Group's name.

@jodator jodator added enhancement New feature or request scope:working-groups The "Working Groups" page and related featrues scope:integration Application integration with external APIs or tools labels Apr 29, 2021
@jodator jodator added this to the Working groups milestone Apr 29, 2021
@jodator jodator self-assigned this Apr 29, 2021
@jodator jodator assigned p-sad and unassigned jodator May 10, 2021
@p-sad p-sad closed this as completed May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scope:integration Application integration with external APIs or tools scope:working-groups The "Working Groups" page and related featrues
Projects
None yet
Development

No branches or pull requests

2 participants