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

Basic directives support #703

Closed
wants to merge 8 commits into from
Closed

Basic directives support #703

wants to merge 8 commits into from

Conversation

illambo
Copy link
Contributor

@illambo illambo commented Dec 7, 2020

Summary

Attempted integration of directives support, see changes in readme for use case.

TODO

  • Directive location:
    • Request definitions:
      • query -> seems accessible via ResolveInfo operation->directives
      • mutation -> seems accessible via ResolveInfo operation->directives
      • subscription -> seems accessible via ResolveInfo operation->directives
      • field
      • fragment_definition
      • fragment_spread
      • inline_fragment
      • variable_definition
    • Type system definitions:
      • schema
      • scalar
      • object
      • field_definition
      • argument_definition
      • interface
      • union
      • enum
      • enum_value
      • input_object
      • input_field_definition
  • Discuss if treating GraphQL directives as middleware or (better) pipeline (see interesting article) maybe in default field resolver
  • Understand possible adaptation of type-modifiers
  • Tests
  • Unlock friendsofphp/php-cs-fixer composer dependency

DEV NOTES

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist

  • Existing tests have been adapted and/or new tests have been added
  • Add a CHANGELOG.md entry
  • Update the README.md
  • Code style has been fixed via composer fix-style

* add abstract directive support
* add configs info
* add defaultFieldResolverWithDirectives in helper
* add abstract directive support
* add configs info
* add defaultFieldResolverWithDirectives in helper
* add tests
* phpstan adjustments
@illambo
Copy link
Contributor Author

illambo commented Dec 10, 2020

I don't understand why the Code Analysis / Code Style checker (pull_request) step fails 😕

@1070rik
Copy link

1070rik commented Dec 10, 2020

Awesome feature! Would love to see this implemented :D

@mfn
Copy link
Collaborator

mfn commented Dec 10, 2020

I don't understand why the Code Analysis / Code Style checker (pull_request) step fails 😕

Seems we're hit by PHP-CS-Fixer/PHP-CS-Fixer#5342 ; let's not worry about this one for now!

@illambo
Copy link
Contributor Author

illambo commented Dec 10, 2020

Yes, seems related to the version of package friendsofphp/php-cs-fixer, in other pr works with v2.16.8 but in this fails v2.17.1 (like u link above).
I try to lock temporarily the package version.

@illambo
Copy link
Contributor Author

illambo commented Dec 19, 2020

I close the pr as at the moment I don't have time to continue the implementation I hope to have more time in the future.

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