Skip to content

Impossible to connect many-to-many relation in one step #68

Open
@ToP29

Description

@ToP29

When i create record datum, which has connection to user, i cannot connect it in same mutation where I create it, because nested mutation wants dataId and i dont have that yet, until datum is created.

const req: Request<MutationCreateDatumArgs> = {
		mutation: CreateDatum,
		variables: {
			input:{
			userData: {
				connectByUserIdAndDataId: [
					{
						dataId: null, // I dont have this yet
						userId: 'Hn67I7nMY9TcBnXsH32UOgFToBf1'
					}
				]
			}
		}
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions