Skip to content

Commit

Permalink
Merge pull request #38 from afosto/Fix/remove-core-organisation-fragment
Browse files Browse the repository at this point in the history
Fix/remove-core-organisation-fragment
  • Loading branch information
Rapid0o authored Nov 25, 2024
2 parents f2b4212 + ad98875 commit 24db48b
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 58 deletions.
76 changes: 72 additions & 4 deletions src/fragments/CoreAccountFragment.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { gql } from '@afosto/graphql-client';
import { CoreAddressFragment } from './CoreAddressFragment';
import { CoreOrganisationFragment } from './CoreOrganisationFragment';
import { CorePhoneNumberFragment } from './CorePhoneNumberFragment';
import { CoreRegistrationFragment } from './CoreRegistrationFragment';

export const CoreAccountFragment = gql`
${CoreAddressFragment}
${CoreOrganisationFragment}
${CorePhoneNumberFragment}
${CoreRegistrationFragment}
fragment CoreAccountFragment on Account {
email
given_name
Expand All @@ -28,15 +28,83 @@ export const CoreAccountFragment = gql`
}
organisations {
id
...CoreOrganisationFragment
avatar
coc_number
created_at
updated_at
name
number
addressing {
billing {
primary {
id
...CoreAddressFragment
}
secondary {
id
...CoreAddressFragment
}
}
}
administration {
email
}
phone_numbers {
primary {
id
...CorePhoneNumberFragment
}
secondary {
id
...CorePhoneNumberFragment
}
}
registration {
id
...CoreRegistrationFragment
}
}
phone_numbers {
id
...CorePhoneNumberFragment
}
shared_organisations {
id
...CoreOrganisationFragment
avatar
coc_number
created_at
updated_at
name
number
addressing {
billing {
primary {
id
...CoreAddressFragment
}
secondary {
id
...CoreAddressFragment
}
}
}
administration {
email
}
phone_numbers {
primary {
id
...CorePhoneNumberFragment
}
secondary {
id
...CorePhoneNumberFragment
}
}
registration {
id
...CoreRegistrationFragment
}
}
}
`;
47 changes: 0 additions & 47 deletions src/fragments/CoreOrganisationFragment.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/fragments/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export * from './CoreChannelFragment';
export * from './CoreFeeFragment';
export * from './CoreItemFilterFragment';
export * from './CoreOrderFragment';
export * from './CoreOrganisationFragment';
export * from './CorePaymentIssuerFragment';
export * from './CorePaymentMethodSummaryFragment';
export * from './CorePhoneNumberFragment';
Expand Down
46 changes: 43 additions & 3 deletions src/mutations/inviteUserToAccountOrganisationMutation.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,55 @@
import { gql } from '@afosto/graphql-client';
import { CoreOrganisationFragment } from '../fragments';
import {
CoreAddressFragment,
CorePhoneNumberFragment,
CoreRegistrationFragment,
} from '../fragments';

export const inviteUserToAccountOrganisationMutation = gql`
${CoreOrganisationFragment}
${CoreAddressFragment}
${CorePhoneNumberFragment}
${CoreRegistrationFragment}
mutation InviteUserToAccountOrganisation(
$invite_user_to_account_organisation_input: AddContactToAccountOrganisationInput!
) {
addContactToAccountOrganisation(input: $invite_user_to_account_organisation_input) {
organisation {
id
...CoreOrganisationFragment
avatar
coc_number
created_at
updated_at
name
number
addressing {
billing {
primary {
id
...CoreAddressFragment
}
secondary {
id
...CoreAddressFragment
}
}
}
administration {
email
}
phone_numbers {
primary {
id
...CorePhoneNumberFragment
}
secondary {
id
...CorePhoneNumberFragment
}
}
registration {
id
...CoreRegistrationFragment
}
}
}
}
Expand Down
46 changes: 43 additions & 3 deletions src/mutations/removeUserFromAccountOrganisationMutation.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,55 @@
import { gql } from '@afosto/graphql-client';
import { CoreOrganisationFragment } from '../fragments';
import {
CoreAddressFragment,
CorePhoneNumberFragment,
CoreRegistrationFragment,
} from '../fragments';

export const removeUserFromAccountOrganisationMutation = gql`
${CoreOrganisationFragment}
${CoreAddressFragment}
${CorePhoneNumberFragment}
${CoreRegistrationFragment}
mutation RemoveUserFromAccountOrganisation(
$remove_user_from_account_organisation_input: RemoveContactFromAccountOrganisationInput!
) {
removeContactFromAccountOrganisation(input: $remove_user_from_account_organisation_input) {
organisation {
id
...CoreOrganisationFragment
avatar
coc_number
created_at
updated_at
name
number
addressing {
billing {
primary {
id
...CoreAddressFragment
}
secondary {
id
...CoreAddressFragment
}
}
}
administration {
email
}
phone_numbers {
primary {
id
...CorePhoneNumberFragment
}
secondary {
id
...CorePhoneNumberFragment
}
}
registration {
id
...CoreRegistrationFragment
}
}
}
}
Expand Down

0 comments on commit 24db48b

Please sign in to comment.