houdini
houdini copied to clipboard
`@[TypeName]_delete` doesn't work for unknown reason
Describe the bug
I can't use the @[TypeName]_delete syntax for one of my mutations. I get the following error and I don't know why:
❌ Encountered error in src/routes/[[locale]]/(authed)/admin/users/page.mutations.ts
Encountered directive referencing unknown list: Invitation_delete
Severity
serious, but I can work around it
Steps to Reproduce the Bug
query UsersList($text: String, $roleMeanings: [RoleMeaningEnum!]) {
usersAndInvitations(text: $text, first: 20, roleMeanings: $roleMeanings)
@paginate(name: "Users") {
edges {
node {
... on User {
id
email
name
roleMeanings
}
... on Invitation {
id
inviteeName
inviteeEmail
role {
id
meaning
}
}
}
}
pageInfo {
endCursor
startCursor
hasNextPage
}
totalCount
}
}
export const InvitationDiscard = graphql(`
mutation InvitationDiscard($input: InvitationDiscardInput!) {
invitationDiscard(input: $input) {
invitation {
id @Invitation_delete // this doesn't work
}
}
}
`);
Reproduction
No response
Sorry to hear things aren't working how you expect. Mind sharing your schema?
sure, here is part of my schema, let me know if you need more
type Invitation {
createdAt: DateTime!
createdAtStr(
"""
besides the usual strftime format options, the following known formats can
be referred to: date, date_month_name, date_month_name_time,
date_month_name_time_year, date_month_name_year, date_time, date_time_year,
date_weekday_month_name, date_weekday_month_name_time,
date_weekday_month_name_time_year, date_weekday_month_name_year, date_year, time
"""
format: String = "date_weekday_month_name_time"
"""
if true will replace today's and tomorrow's dates with 'today' and 'tomorrow'
"""
relative: Boolean = false
): String!
creator: User
expired: Boolean!
expiresAt: DateTime!
expiresAtStr(
"""
besides the usual strftime format options, the following known formats can
be referred to: date, date_month_name, date_month_name_time,
date_month_name_time_year, date_month_name_year, date_time, date_time_year,
date_weekday_month_name, date_weekday_month_name_time,
date_weekday_month_name_time_year, date_weekday_month_name_year, date_year, time
"""
format: String = "date_weekday_month_name_time"
"""
if true will replace today's and tomorrow's dates with 'today' and 'tomorrow'
"""
relative: Boolean = false
): String!
id: ID!
invitee: User
inviteeEmail: String!
inviteeName: String!
role: Role
roleMeaning: RoleMeaningEnum!
updatedAt: DateTime!
updatedAtStr(
"""
besides the usual strftime format options, the following known formats can
be referred to: date, date_month_name, date_month_name_time,
date_month_name_time_year, date_month_name_year, date_time, date_time_year,
date_weekday_month_name, date_weekday_month_name_time,
date_weekday_month_name_time_year, date_weekday_month_name_year, date_year, time
"""
format: String = "date_weekday_month_name_time"
"""
if true will replace today's and tomorrow's dates with 'today' and 'tomorrow'
"""
relative: Boolean = false
): String!
used: Boolean!
}
type User implements ActsAsUser {
agents: [Agent!]!
avatarUrl: String!
"""
the role the user has for the current tenant (if present)
"""
currentRole: Role
email: String!
id: ID!
image: ImageAttachment
maintainer: Boolean!
name: String!
otpEnabled: Boolean!
roleMeanings: [RoleMeaningEnum!]!
roles: [Role!]!
seenMessages: [Int!]!
tenants: [Tenant!]!
}
interface ActsAsUser {
avatarUrl: String!
email: String!
id: ID!
image: ImageAttachment
maintainer: Boolean!
name: String!
otpEnabled: Boolean!
seenMessages: [Int!]!
tenants: [Tenant!]!
}
type Query {
usersAndInvitations(
"""
Returns the elements in the list that come after the specified cursor.
"""
after: String
"""
Returns the elements in the list that come before the specified cursor.
"""
before: String
"""
Returns the first _n_ elements from the list.
"""
first: Int
"""
Returns the last _n_ elements from the list.
"""
last: Int
roleMeanings: [RoleMeaningEnum!]
text: String
): UserInvitationUnionConnection!
}
Sorry for lagging on the response here - could you share the definition for UserInvitationUnionConnection?
I'm going to close this since its gone a bit stale. let me know if the problem persists and we can look into it