Skip to content
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

Fields called prev and next are removed from response objects in 1.2.13+ #1192

Closed
anna-is-cute opened this issue Sep 30, 2023 · 3 comments · Fixed by #1193
Closed

Fields called prev and next are removed from response objects in 1.2.13+ #1192

anna-is-cute opened this issue Sep 30, 2023 · 3 comments · Fixed by #1193

Comments

@anna-is-cute
Copy link

Describe the bug

I have a query that looks like this

query GetFeaturedMods($page: Int!, $count: Int!, $filterInfo: FilterInfo) {
    featuredPackages(page: $page, count: $count, filterInfo: $filterInfo) {
        pageInfo {
            prev
            next
        }

        packages {
            // ...
        }
    }
}

The actual JSON response looks like this

{
  "data": {
    "featuredPackages": {
      "pageInfo": {
        "prev": false,
        "next": true
      },
      "packages": [
        // ...
      ]
    }
  }
}

However, starting in Houdini 1.2.13, I get this as the response from Houdini.

Object { featuredPackages: {…} }
    featuredPackages: Object { pageInfo: {}, packages: (1) […] }
    <prototype>: Object { … }

Note that the prev and next keys are fully missing. In 1.2.12 and all previous versions, the object is populated as expected. I understand Houdini has its own pagination system, so maybe that's causing some interference, but I can't imagine that's intentional!

Severity

blocking an upgrade

Steps to Reproduce the Bug

  1. Run a query as listed above from a +page.ts
const featured = load_GetFeaturedMods({
    variables: {
        page: state.featuredPage || 0,
        count: 6,
    },
    event,
});

const data = await loadAll(
    // other queries go here as well
    featured,
);

return {
    ...data,
    // other stuff
};
  1. Try to access the pageInfo object

Reproduction

No response

@anna-is-cute
Copy link
Author

@anna-is-cute anna-is-cute changed the title Field called pageInfo in response is wiped out in 1.2.13+ Fields called prev and next are removed from response objects in 1.2.13+ Sep 30, 2023
@AlecAivazis
Copy link
Collaborator

🤦 yep! Good catch - i'll get something out now

@AlecAivazis
Copy link
Collaborator

Fix will be deployed in v1.2.22 once #1194 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants