Ok, I now see what is happening after you shared your repo.
Organization
The SDL generated for the Organization
type is invalid:
export const schema = gql`
type Organization {
id: Int!
clubs: [Club]!
wallet: [Wallet]!
members: [User]!
}
type Query {
organizations: [Organization!]! @requireAuth
organization(id: Int!): Organization @requireAuth
}
input CreateOrganizationInput {
}
input UpdateOrganizationInput {
}
type Mutation {
createOrganization(input: CreateOrganizationInput!): Organization! @requireAuth
updateOrganization(id: Int!, input: UpdateOrganizationInput!): Organization! @requireAuth
deleteOrganization(id: Int!): Organization! @requireAuth
}
`
Note that the
input CreateOrganizationInput {
}
input UpdateOrganizationInput {
}
input ties have no fields because your model:
model Organization {
id Int @id @default(autoincrement())
clubs Club[]
wallet Wallet[]
members User[]
}
only has relations, no editable fields.
So, really there are no mutations possible â well easy ones to generate. And because the SDL is invalid then code/type gen fails.
You can create or update, but youâll have to write those manually if you want to create the Organization and populate the nested wallets, clubs, etc.
UserCredential
The service test generation fails using Bytes for the pubicKey field.
See GraphQL and Scaffolding does not support Prisma Bytes data type · Issue #5841 · redwoodjs/redwood · GitHub
That said:
@rob notes:
You shouldnât create a scaffold for UserCredential
either, you canât really manually create records for that table, so thereâs no need to have a UI for it.
But youâre saying that once you create the UserCredential
model and migrate the database, that you canât create a scaffold for User
and it blows up?
That error sounds like the API server stopped running, can you check back further in the console output and see what the error was that crashed it?
See: GraphQL and Scaffolding does not support Prisma Bytes data type · Issue #5841 · redwoodjs/redwood · GitHub
And there are docs Adds docs about removing any UserCredential relationship manually from generated User SDL by cannikin · Pull Request #6672 · redwoodjs/redwood · GitHub and here: Self-hosted Authentication (dbAuth) | RedwoodJS Docs
Thus the recommendation is not to generate that UserCrednetial sdl and remove any use of in the in User SDl type.