-
Notifications
You must be signed in to change notification settings - Fork 0
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
WIP: Symfony 7 and GraphQLite 8 #1
Conversation
a1dfb6e
to
ee6aadb
Compare
ee6aadb
to
2420914
Compare
Refs: thecodingmachine/graphqlite#708 (problem with parameter annotations and validator annotations) |
Refs: thecodingmachine/graphqlite#707 (stable release for commits about improving performance and dropping doctrine annotations support) |
TBH, I spent some time but couldn't narrow down the root of the problem with inability to find a type for |
@SCIF I will try to investigate it today later. After 15 minutes yesterday I failed to find the reason. There is more than one problem remaining |
@SCIF it is related to the in-memory cache and ordering of type mappers (). I need to investigate further about the latest performance improvements that was added to the Here's a monkey patch: diff --git a/SchemaFactory.php b/SchemaFactory.php
index 3991341..8f4c7e7 100644
--- a/SchemaFactory.php
+++ b/SchemaFactory.php
@@ -462,20 +462,6 @@ class SchemaFactory
$inputTypeUtils = new InputTypeUtils($annotationReader, $namingStrategy);
$inputTypeGenerator = new InputTypeGenerator($inputTypeUtils, $fieldsBuilder, $this->inputTypeValidator);
- if ($this->namespaces) {
- $compositeTypeMapper->addTypeMapper(new ClassFinderTypeMapper(
- $classFinder,
- $typeGenerator,
- $inputTypeGenerator,
- $inputTypeUtils,
- $this->container,
- $annotationReader,
- $namingStrategy,
- $recursiveTypeMapper,
- $classFinderComputedCache,
- ));
- }
-
if (! empty($this->typeMapperFactories) || ! empty($this->queryProviderFactories)) {
$context = new FactoryContext(
$annotationReader,
@@ -507,6 +493,19 @@ class SchemaFactory
$compositeTypeMapper->addTypeMapper($typeMapper);
}
+ if ($this->namespaces) {
+ $compositeTypeMapper->addTypeMapper(new ClassFinderTypeMapper(
+ $classFinder,
+ $typeGenerator,
+ $inputTypeGenerator,
+ $inputTypeUtils,
+ $this->container,
+ $annotationReader,
+ $namingStrategy,
+ $recursiveTypeMapper,
+ $classFinderComputedCache,
+ ));
+ }
$compositeTypeMapper->addTypeMapper(new PorpaginasTypeMapper($recursiveTypeMapper));
$queryProviders = []; |
The root cause, is that there're at least two instances of This obviously should be fixed in the |
OK, I managed with the proper solution. I will create a PR in the |
Great news! I found out the caching mechanism extremely weird during debugging and requiring high focus on details. |
117f658
to
b9b6bc7
Compare
I temporarily switched to the own fork of Awaits upstream
After that - this PR can be recreated to the upstream |
I need a stable release of graphqlite (it will be 8.0.0 thecodingmachine/graphqlite#708 (comment)) and to create PR in https://github.com/thecodingmachine/graphqlite-symfony-validator-bridge to make it compatible with the future |
graphqlite 8.0.0 has been tagged 🎉 😊 Ref: |
ec2e04f
to
504dc08
Compare
I need to rebase this PR over this one: thecodingmachine#227 And will land PR to the origin (Symfony 7 + GraphQLite 8) |
Co-authored-by: homersimpsons <[email protected]>
…Symfony 6, which is not require 8.2+
…dator there's dropped support for annotations
…ions, simplify phpunit config and to improve autoloader configuration
…opped support for doctrine annotations. Drop support for doctrine annotations
…nstead of global DI container
…argeted to the method
…ture mismatch) is not supported anymore
…PR's is merged now
… bridge (unreleased, unmerged)
504dc08
to
d158328
Compare
# Conflicts: # .travis.yml # composer.json
PR landed in upstream thecodingmachine#229 |
Continuation of thecodingmachine#203
0.5.4
forComposerFinder::inNamespace
alekitto/class-finder#24