Skip to content

[Bug?]: v6 doesn't allow for a Subscription sdl type. #8988

@noire-munich

Description

@noire-munich

What's not working?

What's happening

Going through the normal process to upgrade to v6-rc, here's what I got when running yarn rw dev, an issue with my sdl types:

af1e8869f08b7a24f4d99de282a4bc4a09754c96

As mentioned here: https://community.redwoodjs.com/t/redwood-v6-0-0-upgrade-guide/5044/33?u=noire.munich.

I've tried with other types, here's what I got:
image

Interestingly, the Client type isn't failing.

What's expected

I'm not a fan of having a functionaly meaningful term being reserved so ideally, a Subscription type should not be a problem. If this is not possible, a warning once the upgrade is complete would do nicely in informing of the reserved names being used in sdl types, maybe with a link to some documentation explaining why it's better to keep those terms reserved.

How do we reproduce the bug?

All you need is to export such an sdl, only the names of the types matter, not the fields they have:

export const schema = gql`
  type Mutation {
    id: Int!
    label: String!
    i18nKey: String!
    slug: String!
    status: SubscriptionStatus!
    description: String!
    stripe_id: String!
    base_amount: Int!
    accounts: [Account]!
  }
  type Query {
    id: Int!
    label: String!
    i18nKey: String!
    slug: String!
    status: SubscriptionStatus!
    description: String!
    stripe_id: String!
    base_amount: Int!
    accounts: [Account]!
  }
  type Client {
    id: Int!
    label: String!
    i18nKey: String!
    slug: String!
    status: SubscriptionStatus!
    description: String!
    stripe_id: String!
    base_amount: Int!
    accounts: [Account]!
  }
`

What's your environment? (If it applies)

No response

Are you interested in working on this?

  • I'm interested in working on this

Metadata

Metadata

Assignees

Labels

bug/confirmedWe have confirmed this is a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions