Replies: 1 comment
-
|
from sqlmodel import SQLModel, Field Define your SQLModelclass Item(SQLModel, table=True): Define Pydantic model for validationclass ItemPydantic(BaseModel): Define Strawberry GraphQL schema@Schema Define Strawberry GraphQL query@strawberry.type Define Strawberry GraphQL mutation@strawberry.type Create Strawberry GraphQL⬤ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
-Description
As per title. Would be great if we had one model that could work with pydastic and strawberry queries. Maybe I'm naïve....
Wanted Solution
I would want execute strawberry and pydastic queries/insertions on a SQLModel.
Wanted Code
-Alternatives
Asking the same in the the strawberry and pydastic repos.
Creating a new project to incorporate all 3....
Operating System
Windows
Operating System Details
Windows 11 home
SQLModel Version
0.0.8
Python Version
3.10
Additional Context
strawberry-graphql/strawberry#1183
Might be some code/additional context here.
Beta Was this translation helpful? Give feedback.
All reactions