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

DOCS: custom graphql filter fields #10192

Conversation

unclecheese
Copy link


class Resolver
{
public static function resolveHasReviewsFilter($list, $args, $context)
Copy link
Member

Choose a reason for hiding this comment

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

Should put in param types in e.g. array $context

$onlyWithReviews = $context['filterValue'];
$comparator = $context['filterComparator'];

if (!in_array($comparator, ['eq','ne'])) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (!in_array($comparator, ['eq','ne'])) {
if (!in_array($comparator, ['eq', 'ne'])) {

@GuySartorelli
Copy link
Member

GuySartorelli commented Jul 7, 2022

Note: This should not be merged here. I have started the process of migrating docs to a new repository so this PR should be closed and a new one should be created there.

@GuySartorelli
Copy link
Member

Closed - docs PR opened at silverstripe/developer-docs#59

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