Releases: torchbox/wagtail-grapple
v0.27.0 - Interfaces and filters
What's Changed
- Fix issue with querying value on EmbedBlock by @JakubMastalerz in #399
- Fix circular import for
PageInterface
when using custom page interface by @mgax in #404 - Add an
in_menu
filter by @dopry in #402 - Add ability to specify the search operator by @dopry in #406
- Replace
SnippetObjectType
withSnippetInterface
by @mgax in #405
See https://wagtail-grapple.readthedocs.io/en/latest/general-usage/interfaces.html#snippetinterface for more details
Full Changelog: v0.26.0...v0.27.0
v0.26 - nullable core chooser blocks
What's Changed
- Ensure ruff version consistency by @zerolab in #393
- Make StreamfieldChooser blocks values nullable by @JakubMastalerz in #396
Full Changelog: v0.25.1...v0.26.0
v0.25.1 - Clean up
Removes pre-Wagtail 5.2 conditional code.
Improves the logic for fetching renditions for SVGs when none of the passed filters are valid: now we return the original SVG, rather than throw an error
v0.25 - Wagtail 5.2+, Django 4.2+
This is mostly a tidy up release - adds Wagtail 6 and Django 5.0 support, and drops support for Wagtail < 5.2, Django < 4.2
What's Changed
- Support Wagtail 5.2+, Wagtail 6+, Python 3.12 and Django 5 by @Morsey187 in #387
- Tooling updates by @zerolab in #388
Full Changelog: v0.24.0...v0.25.0
v0.24 - better redirects for multi-site setups
This release makes working with redirects in multi-site setups easier by adding more details. It:
- Exposes the
site
field. - Supports redirects without a
new_url
orpage
thus making HTTP 410 handling possible. - Returns one result per associated site.
Warning
This is a breaking change release.
- The
new_url
in results now takes into account theRedirect
site. Previously, this would always useBASE_URL
(from the settings file) - Redirects that apply to all sites (i.e. not associated with a specific
site
) now appear multiple times when querying - one for each Site created in Wagtail.
Upgrade considerations
In a multi-site setup, you should add the site
field to any redirect
queries to help disambiguate between redirects that apply to all sites.
For example, given we have two Sites created in Wagtail:
and a single Redirect from old-path
to new-path
that is not associated with any specific site (and thus applies to all sites).
Previously, querying for a redirect:
{
redirects {
newUrl
oldUrl
oldPath
page {
id
}
isPermanent
}
}
would produce:
{
"data": {
"redirects": [
{
"isPermanent": true,
"newUrl": "http://www.example.com/new-path",
"oldPath": "/old-path",
"oldUrl": "http://www.example.com/old-path",
"page": null
}
]
}
}
which excludes the redirect that applies to https://www.another-example.com.
As of this release, the same query would produce:
{
"data": {
"redirects": [
{
"isPermanent": true,
"newUrl": "http://www.example.com/new-path",
"oldPath": "/old-path",
"oldUrl": "http://www.example.com/old-path",
"page": null,
},
{
"isPermanent": true,
"newUrl": "http://www.another-example.com/new-path",
"oldPath": "/old-path",
"oldUrl": "http://www.another-example.com/old-path",
"page": null,
}
]
}
}
To disambiguate the results, you should add site
to your query, for example:
{
redirects {
newUrl
oldUrl
oldPath
page {
id
}
isPermanent
site {
hostname
}
}
}
which would return:
{
"data": {
"redirects": [
{
"isPermanent": true,
"newUrl": "http://www.example.com/new-path",
"oldPath": "/old-path",
"oldUrl": "http://www.example.com/old-path",
"page": null,
"site": {
"hostname": "www.example.com"
}
},
{
"isPermanent": true,
"newUrl": "http://www.another-example.com/new-path",
"oldPath": "/old-path",
"oldUrl": "http://www.another-example.com/old-path",
"page": null,
"site": {
"hostname": "www.another-example.com"
}
}
]
}
}
What's Changed
- Fixed test failing for wagtail 5.2 by @JakubMastalerz in #378
- Avoid using hardcoded localhost in Redirects by @JakubMastalerz in #380
New Contributors
- @JakubMastalerz made their first contribution in #378
Full Changelog: v0.23.0...v0.24.0
v0.23 - preserveSvg everywhere, by default
This releases ensures srcSet
supports the preserveSvg
flag, and that the flag is True by default
What's Changed
- CI speedups by @zerolab in #368
- Implement
preserveSvg
flag forsrcSet()
by @mgax in #370 - Make
preserveSvg
default totrue
by @mgax in #371 - Tweak tox-gh-action by @zerolab in #372
Full Changelog: v0.22.0...v0.23.0
v0.22 - All about Interfaces
This release adds the ability to swap the default PageInterface
as well as the ability to define additional interfaces for your model types
What's Changed
- SteamField block extra interfaces (part 1) by @mgax in #365
- feat: override PageInterface by @Leden, @dopry, @zerolab in #325
- Use the official black pre-commit mirror by @zerolab in #367
- Define additional interfaces via
graphql_interfaces
by @zerolab in #366
New Contributors
Full Changelog: v0.21.0...v0.22.0
v0.21.0 - a pinch of SVGs in a sea of consistency
This release adds better handling of SVG images.
It also introduced a couple of potentially breaking changes: passes the GraphQLResolveInfo
object to StreamField callables, and uses consistent ID
type for page queries. See below
What's Changed
-
Uniform ID Type for pages and page Queries by @estyxx in #350
[!WARNING]
if your query looked likequery($id: Int) { page(id: $id) { ... } }
it need to change to
query($id: ID) { page(id: $id) { ... } }
-
Pass the
GraphQLResolveInfo
object to the StreamField callables by @zerolab in #356[!WARNING]
This is a breaking change and requires existing resolver signatures to be updated.# before def get_field(self, value=None): ... # - or - def get_field(self, *, value=None): ... # after def get_field(self, info, value=None): ... # - or - def get_field(self, *, info, value=None): ... # or, type-hinted from graphql import GraphQLResolveInfo def get_field(self, info: GraphQLResolveInfo, value: dict[str, Any] | None): ...
-
Switch to using tox by @zerolab in #360
We now test with a wider combination of Django + Wagtail -
Add SVG support by @zerolab in #359
You can differentiate images using theisSVG
property. The image rendition field accepts apreserveSvg
argument which will help prevent raster image operations (e.g. format-webp, bgcolor, etc.) being applied to SVGs. Reference[!NOTE]
The image rendition query will now surface any errors when:- using filters not present in the
ALLOWED_IMAGE_FILTERS
Grapple setting, - there are no filters to apply (for example you are requesting an SVG rendition but supply raster image operations)
- the source image is not present
Previously we would silently absorb them, returning null/None for the rendition.
- using filters not present in the
New Contributors
Full Changelog: v0.20.0...v0.21.0
v0.20 - a fistful of changes
What's Changed
- Drop support for Wagtail < 4.1 by @zerolab in #314
- Drop tests against Wagtail main by @zerolab in #316
- chore: test with postgres by @dopry in #301
- feat: add searchScore field to pages by @dopry in #320
- Use all middleware defined in decorator by @seb-b in #281
- Pass arguments to callables for resolving StreamField block values by @bbliem in #322
- chore: re-organize test app by @dopry in #324
- Fix: test embed raw value by @dopry in #328
- Switch to using Ruff by @zerolab in #334
- Use flit for packaging by @zerolab in #335
- Drop channels support by @zerolab in #336
- Consolidate handling when resolving Sites and avoid making assumptions about what data to return when it's ambiguous by @kbayliss in #342
- Fix rendition definition by @zerolab in #337
- Support graphene type arguments by @Morsey187 in #333
- Switch to PyPI trusted publishing, and tidy up docs and pre commit by @zerolab in #344
New Contributors
Full Changelog: v0.19.2...v0.20.0
v0.19.2 - searching for order and relevance
What's Changed
Full Changelog: v0.19.1...v0.19.2