groups
Creates, updates, deletes, gets or lists a groups resource.
Overview
| Name | groups |
| Type | Resource |
| Id | vercel.microfrontends.groups |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
groups | array | |
max_microfrontends_groups_per_team | number | (wire: maxMicrofrontendsGroupsPerTeam) |
max_microfrontends_per_group | number | (wire: maxMicrofrontendsPerGroup) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | team_id, slug | Get the microfrontends group IDs for a team. | |
create | insert | group_name, default_app, other_applications | team_id, slug | Creates a microfrontends group and attaches multiple projects in a single request. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
slug | string | The Team slug to perform the request on behalf of. |
team_id | string | The Team identifier to perform the request on behalf of. (wire: teamId) |
SELECT examples
- list
Get the microfrontends group IDs for a team.
SELECT
groups,
max_microfrontends_groups_per_team,
max_microfrontends_per_group
FROM vercel.microfrontends.groups
WHERE team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;
INSERT examples
- create
- Manifest
Creates a microfrontends group and attaches multiple projects in a single request.
INSERT INTO vercel.microfrontends.groups (
group_name,
default_app,
other_applications,
team_id,
slug
)
SELECT
'{{ group_name }}' /* required */,
'{{ default_app }}' /* required */,
'{{ other_applications }}' /* required */,
'{{ team_id }}',
'{{ slug }}'
RETURNING
new_microfrontends_group
;
# Description fields are for documentation purposes
- name: groups
props:
- name: group_name
value: "{{ group_name }}"
description: |
The name of the microfrontends group that will be used to identify the group
- name: default_app
description: |
The default app for the new microfrontend group
value:
projectId: "{{ projectId }}"
defaultRoute: "{{ defaultRoute }}"
- name: other_applications
description: |
The list of other applications that will be used in the new microfrontend group
value:
- projectId: "{{ projectId }}"
defaultRoute: "{{ defaultRoute }}"
- name: team_id
value: "{{ team_id }}"
description: The Team identifier to perform the request on behalf of.
description: The Team identifier to perform the request on behalf of.
- name: slug
value: "{{ slug }}"
description: The Team slug to perform the request on behalf of.
description: The Team slug to perform the request on behalf of.