OBJECT

Mutation

This is the root mutation

link GraphQL Schema definition

  • type Mutation {
  • # Add funds to the given account
  • #
  • # Arguments
  • # fromAccount: [Not documented]
  • # account: [Not documented]
  • # amount: [Not documented]
  • # description: [Not documented]
  • # hostFeePercent: [Not documented]
  • # platformFeePercent: Can only be set if root
  • addFunds(
  • fromAccount: AccountReferenceInput!,
  • account: AccountReferenceInput!,
  • amount: AmountInput!,
  • description: String!,
  • hostFeePercent: Int!,
  • platformFeePercent: Int
  • ): Order!
  • # Arguments
  • # collective: Information about the collective to create (name,
  • # slug, description, tags, ...)
  • # host: Reference to the host to apply on creation.
  • # automateApprovalWithGithub: Wether to trigger the automated
  • # approval for Open Source collectives with GitHub.
  • # message: A message to attach for the host to review the
  • # application
  • createCollective(
  • collective: CollectiveCreateInput!,
  • host: AccountReferenceInput,
  • automateApprovalWithGithub: Boolean,
  • message: String
  • ): Collective
  • # Arguments
  • # fund: Information about the collective to create (name, slug,
  • # description, tags, ...)
  • # host: Reference to the host to apply on creation.
  • createFund(fund: FundCreateInput!, host: AccountReferenceInput): Fund
  • # Arguments
  • # organization: Information about the organization to create
  • # (name, slug, description, website, ...)
  • createOrganization(organization: OrganizationCreateInput!): Organization
  • # Arguments
  • # project: Information about the Project to create (name, slug,
  • # description, tags, settings)
  • # parent: Reference to the parent Account creating the Project.
  • createProject(
  • project: ProjectCreateInput!,
  • parent: AccountReferenceInput
  • ): Project
  • # Arguments
  • # comment: [Not documented]
  • editComment(comment: CommentUpdateInput!): Comment
  • # Arguments
  • # id: [Not documented]
  • deleteComment(id: String!): Comment
  • # Arguments
  • # comment: [Not documented]
  • createComment(comment: CommentCreateInput!): Comment
  • # Arguments
  • # emoji: The emoji associated with the reaction
  • # comment: A unique identifier for the comment id associated with
  • # this comment reaction
  • addCommentReaction(
  • emoji: String!,
  • comment: CommentReferenceInput!
  • ): Comment!
  • # Arguments
  • # comment: [Not documented]
  • # emoji: [Not documented]
  • removeCommentReaction(
  • comment: CommentReferenceInput!,
  • emoji: String!
  • ): Comment!
  • # Connect external account to Open Collective Account
  • #
  • # Arguments
  • # connectedAccount: Connected Account data
  • # account: Account where the external account will be connected
  • createConnectedAccount(
  • connectedAccount: ConnectedAccountCreateInput!,
  • account: AccountReferenceInput!
  • ): ConnectedAccount
  • # Delete ConnectedAccount
  • #
  • # Arguments
  • # connectedAccount: ConnectedAccount reference containing either
  • # id or legacyId
  • deleteConnectedAccount(
  • connectedAccount: ConnectedAccountReferenceInput!
  • ): ConnectedAccount
  • # Create a conversation
  • #
  • # Arguments
  • # title: Conversation's title
  • # html: The body of the conversation initial comment
  • # CollectiveId: ID of the Collective where the conversation will
  • # be created
  • # tags: A list of tags for this conversation
  • createConversation(
  • title: String!,
  • html: String!,
  • CollectiveId: String!,
  • tags: [String]
  • ): Conversation
  • # Arguments
  • # id: Conversation's id
  • # title: Conversation's title
  • # tags: A list of tags for this conversation
  • editConversation(id: String!, title: String!, tags: [String]): Conversation
  • # Returns true if user is following, false otherwise. Must be authenticated.
  • #
  • # Arguments
  • # id: Conversation's id
  • # isActive: Set this to false to unfollow the conversation
  • followConversation(id: String!, isActive: Boolean): Boolean
  • # Submit an expense to a collective
  • #
  • # Arguments
  • # expense: Expense data
  • # account: Account where the expense will be created
  • createExpense(
  • expense: ExpenseCreateInput!,
  • account: AccountReferenceInput!
  • ): Expense!
  • # To update an existing expense
  • #
  • # Arguments
  • # expense: Expense data
  • # draftKey: Expense draft key if invited to submit expense
  • editExpense(expense: ExpenseUpdateInput!, draftKey: String): Expense!
  • # Delete an expense. Only work if the expense is rejected - please check
  • # permissions.canDelete.
  • #
  • # Arguments
  • # expense: Reference of the expense to delete
  • deleteExpense(expense: ExpenseReferenceInput!): Expense!
  • # Process the expense with the given action
  • #
  • # Arguments
  • # expense: Reference of the expense to process
  • # action: The action to trigger
  • # paymentParams: If action is related to a payment, this object
  • # used for the payment parameters
  • processExpense(
  • expense: ExpenseReferenceInput!,
  • action: ExpenseProcessAction!,
  • paymentParams: ProcessExpensePaymentParams
  • ): Expense!
  • # Persist an Expense as a draft and invite someone to edit and submit it.
  • #
  • # Arguments
  • # expense: Expense data
  • # account: Account where the expense will be created
  • draftExpenseAndInviteUser(
  • expense: ExpenseInviteDraftInput!,
  • account: AccountReferenceInput!
  • ): Expense!
  • # To verify an unverified expense.
  • #
  • # Arguments
  • # expense: Reference of the expense to process
  • resendDraftExpenseInvite(
  • expense: ExpenseReferenceInput!
  • ): Expense!
  • # To verify and unverified expense.
  • #
  • # Arguments
  • # expense: Reference of the expense to process
  • # draftKey: Expense draft key if invited to submit expense
  • verifyExpense(expense: ExpenseReferenceInput!, draftKey: String): Expense!
  • # Apply to an host with a collective
  • #
  • # Arguments
  • # collective: Account applying to the host.
  • # host: Host to apply to.
  • # message: A message to attach for the host to review the
  • # application
  • applyToHost(
  • collective: AccountReferenceInput!,
  • host: AccountReferenceInput!,
  • message: String
  • ): Collective!
  • # Reply to a host application
  • #
  • # Arguments
  • # account: The account that applied to the host
  • # host: The host concerned by the application
  • # action: What to do with the application
  • # message: A message to attach as a reason for the action
  • processHostApplication(
  • account: AccountReferenceInput!,
  • host: AccountReferenceInput!,
  • action: ProcessHostApplicationAction!,
  • message: String
  • ): ProcessHostApplicationResponse!
  • # Edit the settings for the given account
  • #
  • # Arguments
  • # account: Account where the settings will be updated
  • # key: The key that you want to edit in settings
  • # value: The value to set for this key
  • editAccountSetting(
  • account: AccountReferenceInput!,
  • key: AccountSettingsKey!,
  • value: JSON!
  • ): Account!
  • # An endpoint for hosts to edit the fees structure of their hosted accounts
  • #
  • # Arguments
  • # account: Account where the settings will be updated
  • # hostFeePercent: The host fee percent to apply to this account
  • # isCustomFee: If using a custom fee, set this to true
  • editAccountFeeStructure(
  • account: AccountReferenceInput!,
  • hostFeePercent: Float!,
  • isCustomFee: Boolean!
  • ): Account!
  • # Add 2FA to the Account if it does not have it
  • #
  • # Arguments
  • # account: Account that will have 2FA added to it
  • # token: The generated secret to save to the Account
  • addTwoFactorAuthTokenToIndividual(
  • account: AccountReferenceInput!,
  • token: String!
  • ): Individual!
  • # Remove 2FA from the Account if it has been enabled
  • #
  • # Arguments
  • # account: Account that will have 2FA removed from it
  • # code: The 6-digit 2FA code
  • removeTwoFactorAuthTokenFromIndividual(
  • account: AccountReferenceInput!,
  • code: String!
  • ): Individual!
  • # Update the plan
  • #
  • # Arguments
  • # account: Account that will have 2FA added to it
  • # plan: The name of the plan to subscribe to.
  • editHostPlan(account: AccountReferenceInput!, plan: String!): Host!
  • # Sends an email for guest to confirm their emails and create their Open
  • # Collective account
  • #
  • # Arguments
  • # email: The email to validate
  • sendGuestConfirmationEmail(email: EmailAddress!): Boolean!
  • # Mark an account as confirmed
  • #
  • # Arguments
  • # email: The email to confirm
  • # emailConfirmationToken: The key that you want to edit in
  • # settings
  • # guestTokens: This can be used to link the other guest
  • # contributions to the user
  • confirmGuestAccount(
  • email: EmailAddress!,
  • emailConfirmationToken: String!,
  • guestTokens: [String!]
  • ): ConfirmGuestAccountResponse!
  • # Create a new Payout Method to get paid through the platform
  • #
  • # Arguments
  • # payoutMethod: Payout Method data
  • # account: Account where the payout method will be associated
  • createPayoutMethod(
  • payoutMethod: PayoutMethodInput!,
  • account: AccountReferenceInput!
  • ): PayoutMethod
  • # Remove the given payout method
  • #
  • # Arguments
  • # payoutMethodId: [Not documented]
  • removePayoutMethod(payoutMethodId: String!): PayoutMethod!
  • # To submit a new order
  • #
  • # Arguments
  • # order: [Not documented]
  • createOrder(order: OrderCreateInput!): OrderWithPayment!
  • # Cancel an order
  • #
  • # Arguments
  • # order: Object matching the OrderReferenceInput (id)
  • cancelOrder(order: OrderReferenceInput!): Order
  • # Update an Order's amount, tier, or payment method
  • #
  • # Arguments
  • # order: Reference to the Order to update
  • # paymentMethod: Reference to a Payment Method to update the
  • # order with
  • # tier: Reference to a Tier to update the order with
  • # amount: An Amount to update the order to
  • updateOrder(
  • order: OrderReferenceInput!,
  • paymentMethod: PaymentMethodReferenceInput,
  • tier: TierReferenceInput,
  • amount: AmountInput
  • ): Order
  • # Arguments
  • # order: [Not documented]
  • # guestToken: If the order was made as a guest, you can use this
  • # field to authenticate
  • confirmOrder(order: OrderReferenceInput!, guestToken: String): OrderWithPayment!
  • # A mutation for the host to approve or reject an order
  • #
  • # Arguments
  • # order: [Not documented]
  • # action: [Not documented]
  • processPendingOrder(
  • order: OrderReferenceInput!,
  • action: ProcessOrderAction!
  • ): Order!
  • # Add a new payment method to be used with an Order
  • #
  • # Arguments
  • # creditCardInfo: The credit card info
  • # name: Name associated to this credit card
  • # isSavedForLater: Whether this credit card should be saved for
  • # future payments
  • # account: Account to add the credit card to
  • addCreditCard(
  • creditCardInfo: CreditCardCreateInput!,
  • name: String!,
  • isSavedForLater: Boolean,
  • account: AccountReferenceInput!
  • ): CreditCardWithStripeError!
  • # Add a new payment method to be used with an Order
  • #
  • # Arguments
  • # creditCardInfo: The credit card info
  • # name: Name associated to this credit card
  • # isSavedForLater: Whether this credit card should be saved for
  • # future payments
  • # account: Account to add the credit card to
  • addStripeCreditCard(
  • creditCardInfo: CreditCardCreateInput!,
  • name: String!,
  • isSavedForLater: Boolean,
  • account: AccountReferenceInput!
  • ): CreditCardWithStripeError! @deprecated( reason: "2020-10-23: Use addCreditCard" )
  • # Confirm a credit card is ready for use after strong customer authentication
  • #
  • # Arguments
  • # paymentMethod: [Not documented]
  • confirmCreditCard(
  • paymentMethod: PaymentMethodReferenceInput!
  • ): CreditCardWithStripeError!
  • # Refunds transaction
  • #
  • # Arguments
  • # transaction: Reference of the transaction to refund
  • refundTransaction(transaction: TransactionReferenceInput!): Transaction!
  • # Rejects transaction, removes member from Collective, and sends a message to the
  • # contributor
  • #
  • # Arguments
  • # transaction: Reference of the transaction to refund
  • # message: Message to send to the contributor whose contribution
  • # has been rejected
  • rejectTransaction(
  • transaction: TransactionReferenceInput!,
  • message: String
  • ): Transaction!
  • # Edit the public message for the given Member of a Collective
  • #
  • # Arguments
  • # fromAccount: Reference to an account for the donating
  • # Collective
  • # toAccount: Reference to an account for the receiving Collective
  • # message: New public message
  • editPublicMessage(
  • fromAccount: AccountReferenceInput!,
  • toAccount: AccountReferenceInput!,
  • message: String
  • ): Member!
  • }

link Require by

This element is not required by anyone