Skip to content

v5 polymorphism branch: @stream bug #2522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jemgillam opened this issue May 29, 2025 · 1 comment
Open

v5 polymorphism branch: @stream bug #2522

jemgillam opened this issue May 29, 2025 · 1 comment
Labels

Comments

@jemgillam
Copy link
Contributor

jemgillam commented May 29, 2025

Ref more-tests branch
Ref grafast/grafast/__tests__/dcc/queries/consumable-items-stream2.test.graphql

A possible bug in the way @stream is used, or a possible bug in our new test suite

Given the query

query ConsumableItems {
  crawler(id: 101) {
    id
    ... on HasInventory {
      items(first: 3) {
        __typename
        id
        ... on HasContents {
          contents(first: 3) {
            __typename
            id
            ... on Equipment {
              maxDurability
            }
            ... on Consumable {
              effect
              ... ...

@stream works as expected when placed here:

query ConsumableItemsStream @incremental {
  crawler(id: 101) {
    id
    ... on HasInventory {
      items(first: 3) @stream {
        __typename
        id 
        ... ...

but when placed in a nested list it is returning nulls:

query ConsumableItemsStream2 @incremental {
  crawler(id: 101) {
    id
    ... on HasInventory {
      items(first: 3) {
        __typename
        id
        ... on HasContents {
          contents(first: 3) @stream {
            __typename
            id
            ... ...

returns the following from our test suite:

Error: Expected operation to be incremental

AssertionError: expected '{\n  crawler: {\n    id: 101,\n    na…' to equal '{\n  crawler: {\n    id: 101,\n    na…'
      + expected - actual

                 name: 'Dolores',
               },
               effect: 'Soften impact surface. Impact x 5',
               contents: [
      -          null,
      -          null,
      +          {
      +            __typename: 'Consumable',
      +            id: 207,
      +            name: 'Crowd Blast Potion',
      +            effect: 'Imitates the Crowd Blast skill',
      +          },
      +          {
      +            __typename: 'Consumable',
      +            id: 208,
      +            name: 'Rock Buffalo Potion',
      +            effect: "A required component of Dolores Doesn't Splat Potion",
      +          },
               ],
             },
@jemgillam
Copy link
Contributor Author

More context, for the working @stream queries, a .incsig file is generated showing data about the streamed payloads. No such file is being generated for this query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🌳 Triage
Development

No branches or pull requests

1 participant