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

Versioning with status:ARCHIVED doesn't work as expected #361

Open
chillu opened this issue Feb 18, 2021 · 1 comment · May be fixed by silverstripe/silverstripe-versioned#323
Open

Versioning with status:ARCHIVED doesn't work as expected #361

chillu opened this issue Feb 18, 2021 · 1 comment · May be fixed by silverstripe/silverstripe-versioned#323

Comments

@chillu
Copy link
Member

chillu commented Feb 18, 2021

This is a pretty low priority use case, but how do I query for all archived records?

query {
  readPages(versioning: {
    mode: STATUS,
    status:ARCHIVED
  }) {
    nodes {
      title
    }
  }
}

This fails with the following error:

Failed to resolve field readPages on ReadPagesConnection.\\n\\n\n            Path: readPages)\\n\\n\n            Resolver SilverStripe\\Versioned\\GraphQL\\Resolvers\\VersionedResolver::resolveVersionedRead failed in execution chain:\\n\\n\n            array (\n  0 => \n  array (\n    0 => 'SilverStripe\\\\GraphQL\\\\Schema\\\\DataObject\\\\ReadCreator',\n    1 => 'resolve',\n  ),\n)\narray (\n  0 => \n  array (\n    0 => 'SilverStripe\\\\Versioned\\\\GraphQL\\\\Resolvers\\\\VersionedResolver',\n    1 => 'resolveVersionedRead',\n  ),\n)\narray (\n  0 => \n  array (\n    0 => 'SilverStripe\\\\GraphQL\\\\Schema\\\\DataObject\\\\Plugin\\\\QueryFilter\\\\QueryFilter',\n    1 => 'filter',\n  ),\n)\narray (\n  0 => \n  array (\n    0 => 'SilverStripe\\\\GraphQL\\\\Schema\\\\DataObject\\\\Plugin\\\\QuerySort',\n    1 => 'sort',\n  ),\n)\narray (\n  0 => \n  array (\n    0 => 'SilverStripe\\\\GraphQL\\\\Schema\\\\DataObject\\\\Plugin\\\\Paginator',\n    1 => 'paginate',\n  ),\n)\narray (\n  0 => \n  array (\n    0 => 'SilverStripe\\\\GraphQL\\\\Schema\\\\DataObject\\\\Plugin\\\\CanViewPermission',\n    1 => 'permissionCheck',\n  ),\n)\\n\\n\n            Args: {\n    \"versioning\": {\n        \"mode\": \"status\",\n        \"status\": [\n            \"archived\"\n        ]\n    },\n    \"limit\": \"100\",\n    \"offset\": \"0\"\n}\\n\\n\n            Got error: The \"status\" mode is not supported for setting versioned reading stages",

If I leave out the mode, it simply shows me all records (not only archived ones)

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