Azure / Azure/data-api-builder

"one-to-many" relationship property should be pluralized if configured property name is singular

Open
#470 1 comment 0 reactions 0 assignees View on GitHub
graphql has-pr improvement needs discussion
Dominant language
C#
Stars
1.5k
Forks
370
Avg merge
3d 17h
Merged PRs (30d)
8

Description

The "many" side of the relationship doesn't get pluralized correctly. For example, this configuration

```json
"category": {
"source": "dbo.categories",
"relationships": {
"book": {
"cardinality": "many",
"target.entity": "book"
}
},
"permissions": [{
"role": "anonymous",
"actions": [ "*" ]
}]
}
```

should allow this GraphQL to be executed:

```graphql
{
categories {
items {
category
books {
items {
id
title
}
}
}
}
}
```

but instead I have this ("book" instead of "books")

```graphql
{
categories {
items {
category
book {
items {
id
title
}
}
}
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.