Commit 9df63f66 authored by Matija Čupić's avatar Matija Čupić

Add the callouts field to the user type

Adds the callouts field to the user GraphQL type
parent 695def36
......@@ -67,5 +67,9 @@ module Types
null: true,
description: 'Snippets authored by the user.',
resolver: Resolvers::Users::SnippetsResolver
field :callouts,
Types::UserCalloutType.connection_type,
null: true,
description: 'User callouts that belong to the user.'
end
end
......@@ -4503,6 +4503,7 @@ Represents a recorded measurement (object count) for the Admins.
| `authoredMergeRequests` | MergeRequestConnection | Merge Requests authored by the user. |
| `avatarUrl` | String | URL of the user's avatar. |
| `bot` | Boolean! | Indicates if the user is a bot. |
| `callouts` | UserCalloutConnection | User callouts that belong to the user. |
| `email` **{warning-solid}** | String | **Deprecated:** Use public_email. Deprecated in 13.7. |
| `groupCount` | Int | Group count for the user. Available only when feature flag `user_group_counts` is enabled. |
| `groupMemberships` | GroupMemberConnection | Group memberships of the user. |
......@@ -4522,6 +4523,13 @@ Represents a recorded measurement (object count) for the Admins.
| `webPath` | String! | Web path of the user. |
| `webUrl` | String! | Web URL of the user. |
### `UserCallout`
| Field | Type | Description |
| ----- | ---- | ----------- |
| `dismissedAt` | Time | Date when the callout was dismissed. |
| `featureName` | UserCalloutFeatureNameEnum! | Name of the feature that the callout is for. |
### `UserPermissions`
| Field | Type | Description |
......@@ -5918,6 +5926,39 @@ State of a test report.
| `personal` | |
| `project` | |
### `UserCalloutFeatureNameEnum`
Name of the feature that the callout is for.
| Value | Description |
| ----- | ----------- |
| `ACCOUNT_RECOVERY_REGULAR_CHECK` | |
| `ACTIVE_USER_COUNT_THRESHOLD` | |
| `ADMIN_INTEGRATIONS_MOVED` | |
| `BUY_PIPELINE_MINUTES_NOTIFICATION_DOT` | |
| `CANARY_DEPLOYMENT` | |
| `CLUSTER_SECURITY_WARNING` | |
| `CUSTOMIZE_HOMEPAGE` | |
| `EOA_BRONZE_PLAN_BANNER` | |
| `FEATURE_FLAGS_NEW_VERSION` | |
| `GCP_SIGNUP_OFFER` | |
| `GEO_ENABLE_HASHED_STORAGE` | |
| `GEO_MIGRATE_HASHED_STORAGE` | |
| `GKE_CLUSTER_INTEGRATION` | |
| `GOLD_TRIAL_BILLINGS` | |
| `NEW_USER_SIGNUPS_CAP_REACHED` | |
| `PERSONAL_ACCESS_TOKEN_EXPIRY` | |
| `REGISTRATION_ENABLED_CALLOUT` | |
| `SERVICE_TEMPLATES_DEPRECATED` | |
| `SUGGEST_PIPELINE` | |
| `SUGGEST_POPOVER_DISMISSED` | |
| `TABS_POSITION_HIGHLIGHT` | |
| `THREAT_MONITORING_INFO` | |
| `ULTIMATE_TRIAL` | |
| `UNFINISHED_TAG_CLEANUP_CALLOUT` | |
| `WEBHOOKS_MOVED` | |
| `WEB_IDE_ALERT_DISMISSED` | |
### `UserState`
Possible states of a user.
......
......@@ -31,6 +31,7 @@ RSpec.describe GitlabSchema.types['User'] do
groupCount
projectMemberships
starredProjects
callouts
]
expect(described_class).to have_graphql_fields(*expected_fields)
......@@ -44,4 +45,12 @@ RSpec.describe GitlabSchema.types['User'] do
is_expected.to have_graphql_resolver(Resolvers::Users::SnippetsResolver)
end
end
describe 'callouts field' do
subject { described_class.fields['callouts'] }
it 'returns user callouts' do
is_expected.to have_graphql_type(Types::UserCalloutType.connection_type)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment