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

Define additional interfaces via graphql_interfaces #366

Merged
merged 6 commits into from
Sep 18, 2023

Conversation

zerolab
Copy link
Member

@zerolab zerolab commented Sep 11, 2023

This allows defining additional interfaces on your models via the graphql_interfaces attribute.

Also does a tiny bit of tidy-up in docs, but not too much. New docs page: https://wagtail-grapple--366.org.readthedocs.build/en/366/general-usage/interfaces.html

@zerolab zerolab requested a review from kbayliss September 11, 2023 15:58
@zerolab zerolab force-pushed the feat/graphql-interfaces branch from 2cbb66d to c4e82e3 Compare September 11, 2023 15:59
@zerolab
Copy link
Member Author

zerolab commented Sep 11, 2023

/cc @mgax @estyxx

Copy link
Contributor

@Morsey187 Morsey187 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
I've Reviewed and tested this locally, just a few nickpicks around the documentation mainly

docs/general-usage/interfaces.rst Outdated Show resolved Hide resolved
docs/general-usage/decorators.rst Show resolved Hide resolved
@@ -9,84 +9,6 @@ detail below.
An existing understanding of GraphQL types will help here.


PageInterface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job moving this!

@@ -229,7 +151,7 @@ You can also query a setting by model name:

.. code-block:: graphql

{
query {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question any reason not to include this change on line 140 above, too? There are also other query examples in decorators.rst and model-types.rst

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may have missed one or two 🙈 Will address and go with a fine comb

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be all sorted in 10acaf2

docs/general-usage/interfaces.rst Outdated Show resolved Hide resolved
docs/general-usage/interfaces.rst Show resolved Hide resolved
@zerolab zerolab force-pushed the feat/graphql-interfaces branch from c4e82e3 to 10acaf2 Compare September 15, 2023 15:29
@zerolab zerolab requested a review from Morsey187 September 15, 2023 15:32
Copy link
Member

@mgax mgax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API to specify interfaces makes more sense than my decorator patch, and I think the code and docs improvements are spot on. I just have a nitpick about lists vs tuples. Can't wait to have this released :)

docs/general-usage/interfaces.rst Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
@zerolab zerolab force-pushed the feat/graphql-interfaces branch from 10acaf2 to e599003 Compare September 18, 2023 08:28
@zerolab zerolab merged commit fb6d52e into main Sep 18, 2023
11 checks passed
@zerolab zerolab deleted the feat/graphql-interfaces branch September 18, 2023 10:25
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 this pull request may close these issues.

3 participants