ProcessGraphQL icon indicating copy to clipboard operation
ProcessGraphQL copied to clipboard

PageClass in page creation

Open sebastiandittrich opened this issue 5 years ago • 2 comments

When creating a page using the GraphQL Endpoint, the class defined in $template->pageClass is not used instead of the default ProcessWire\Page class. This can cause issues if you rely on the correct page class for further processing of the page, for example in beforeSave Hooks.

The code where this should be implemented is here: https://github.com/dadish/ProcessGraphQL/blob/2b28b6914dba6416f2e6c2506c882f2a1f2e56cf/src/Field/Mutation/CreatePage.php#L111

sebastiandittrich avatar Sep 01 '20 12:09 sebastiandittrich

Should be pretty straightforward to implement. Most work will be related to creating a good test cases. Will have to create custom pages for this in the db. Will try to resolve this this weekend.

dadish avatar Sep 04 '20 14:09 dadish

@sebastiandittrich Please close if this is fixed.

dadish avatar Aug 28 '22 21:08 dadish