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

GraphqlV2: return hosts as Host and not as Organization #9608

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

znarf
Copy link
Member

@znarf znarf commented Dec 18, 2023

  • Make Hosts returned as Host instead of Organization

Replace (BREAKING CHANGE):

... on Organization {
  host {
    id
    hostFeePercent
  }
}

with simpler:

... on Host {
  id
  hostFeePercent
}

or:

... on Host {
  host {
    id
    hostFeePercent
  }
}
  • Make Hosts be an AccountWithHost to simplify things on the frontend side

Idea is to avoid such weird code:

... on AccountWithHost {
  host {
    id
    slug
    paypalClientId
    supportedPaymentMethods
  }
}
... on Organization {
  host {
    id
    slug
    paypalClientId
    supportedPaymentMethods
  }
}

And replace with just:

... on AccountWithHost {
  host {
    id
    slug
    paypalClientId
    supportedPaymentMethods
  }
}

@znarf znarf changed the title graphqlV2: return hosts as Host and not as Organization GraphqlV2: return hosts as Host and not as Organization Dec 19, 2023
@znarf znarf marked this pull request as ready for review December 19, 2023 14:34
@znarf
Copy link
Member Author

znarf commented Dec 19, 2023

This is a breaking change and Frontend (at least) needs to be pushed at the same time.
opencollective/opencollective-frontend#9769

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.

1 participant