authgear / authgear/authgear-server

Improve Admin API for User Profiles update (standard/custom attributes)

Open
#3,828 0 comments 0 reactions 0 assignees View on GitHub
pitch
Dominant language
Go
Stars
2k
Forks
125
Avg merge
2d 17h
Merged PRs (30d)
32

Description

## Problem

Currently, the standard/custom attributes related GraphQL Admin API, could only be updated as a whole, as the backend implementation is a JSONB.

It created the following problems:
1. Client requires at least 2 requests to update an attribute (one for query, one for storing the updated attribute)
2. It has a high chance for conflict as updating one attribute will update all attributes no matter what. There is no way to guarantee consistency.

## Appetite

2 weeks

## Solution

A new Admin API should be available for updating attributes; it should:

1. Allow updating one attribute without updating all.
2. Provide ways to conduct C*UD, aka create a new attribute or delete an attribute, besides updating one.
3. Provide an "update only if" option for simple consistency (optional, welcome for a better idea.)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing GraphQL Admin API for standard and custom user-profile attributes and the backend JSONB storage path. Define the API behavior for individual create, update, and delete operations, including the optional update-only-if condition. Done means clients can change one attribute without reading and rewriting the full attribute set, with consistency behavior covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, graphql
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.