Comments (4)
Require user to provide values for default columns in the request. and add explicit error messaging if not provided so user knows what to do to mitigate HTTP 400 bad request/ GraphQL equivalent error message.
from data-api-builder.
@severussundar please update expectations and description for this feature.
from data-api-builder.
Relationship fields when backed by default values will be required to be provided by the user.
Consider two entities: User_AutogenToNonAutogenRelationshipColumn
and UserProfile
Entity User_AutogenToNonAutogenRelationshipColumn
has the following relationship defined with entity UserProfile
.
"UserProfile_AutogenToNonAutogenRelationshipColumn": {
"cardinality": "one",
"target.entity": "UserProfile",
"source.fields": [
"userid",
"username"
],
"target.fields": [
"userid",
"username"
],
"linking.source.fields": [],
"linking.target.fields": []
}
Relationship Fields
User_AutogenToNonAutogenRelationshipColumn: userid
, username
UserProfile: userid
, username
. userid
column has a default value of 1.
mutation {
createUser_AutogenToNonAutogenRelationshipColumn(
item: {
email: "[email protected]"
UserProfile_AutogenToNonAutogenRelationshipColumn: {
profilepictureurl: "https://example.com/profiles/alice"
username: "Alice"
}
}
) {
userid
username
email
UserProfile_AutogenToNonAutogenRelationshipColumn {
profileid
username
userid
profilepictureurl
}
}
}
The above mutation request does not provide an input for userid
field for the relationship field UserProfile_AutogenToNonAutogenRelationshipColumn
. It only provides input for username
. When executed this request, it will error out with the following error message.
{
"errors": [
{
"message": "Neither source entity: User_AutogenToNonAutogenRelationshipColumn nor the target entity: UserProfile for the relationship: UserProfile_AutogenToNonAutogenRelationshipColumn at level: 1 provide sufficient data to perform a multiple-create (related insertion) on the entities.",
"extensions": {
"code": "BadRequest"
}
}
],
"data": {
"createUser_AutogenToNonAutogenRelationshipColumn": null
}
}
from data-api-builder.
Require values to be provided even for columns which have defaults to determine referencing and referenced entities.
from data-api-builder.
Related Issues (20)
- [Bug]: Swagger definition labelled as "PREVIEW" - but why?
- [Bug]: Inconsistent and superflous logging?
- [Bug]: Docs bug
- [Bug]: Token Validation Failed
- [Documentation] I need some detail description on how to configure OAuth2/JWT in SWA Database connections HOT 4
- Add SQL tests for Culture invariant
- Replace copies of RuntimeConfig with RuntimeConfigProvider HOT 2
- Refresh Telemetry when Hot-Reloading RuntimeOptions
- Hot-reload and refresh dependencies on the DataSource section
- Hot-Reload Entities and refresh GraphQL Schema and Authorization
- Refresh Authentication as part of a Hot-Reload scenario. HOT 2
- Hot-Reload of all DataSourceFiles
- Trying to login to a SQL Analytics endpoint of Microsoft Fabric HOT 2
- Snowflake Support
- [Bug]: Exporting GraphQL schema does not work with cosmosdb emulator HOT 1
- [Bug]: Missing pagination property in dab.draft.schema.json HOT 1
- [Bug]: Odd config file requirements to get "complex" cosmosdb_nosql to work HOT 2
- [Bug]: Dev dependencies deployed with dotnet tool that amount to 125MB of clutter
- [Bug]: MSSQL (and related) - EXEC sp_set_session_context is executed with @read_only = 1
- Update SerializationDeserialization tests to validate field names and not field count.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data-api-builder.