-
Notifications
You must be signed in to change notification settings - Fork 18
FEATURE: Custom graphql adapter #188
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
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
0c5f3dc
FEATURE: Replace t3n/graphql dependency with custom implementation
Sebobo 0d53fb7
TASK: Fix various type issues in queries
Sebobo bd85a10
BUGFIX: Similar assets module was missing theme variables
Sebobo 2e90a0c
TASK: Enable similar assets query with new api
Sebobo c9a67f1
TASK: Add missing typename to fixtures
Sebobo 9482807
TASK: Make assetVariants query work in new api
Sebobo 05371ae
BUGFIX: Error when parsing changed assets
Sebobo e8949c1
TASK: Implement updateAsset in new api
Sebobo 77df58c
FEATURE: Implement domain mutations in new GrahpQL adapter
Sebobo 9d0d87e
TASK: Bump required node version for building frontend assets
Sebobo 01bd99e
FEATURE: Introduce retry handler to better handle graphql and network…
Sebobo f56f1b7
TASK: Fix wwision types package versions
Sebobo f35f4b9
BUGFIX: Only poll for changes if feature flag is enabled
Sebobo 7cadb2c
TASK: Make upload asset work with new graphql adapter
Sebobo 6499745
TASK: Make replace asset work with new graphql adapter
Sebobo 1d09889
TASK: Update wwwision types dependencies
Sebobo ec300c2
TASK: Code cleanup
Sebobo a067c50
TASK: Generate new graphql schema based on PHP types
Sebobo e53cfbc
TASK: Move package to root folder
Sebobo c7536e4
Merge branch 'main' into feature/custom-graphql-adapter
Sebobo a8e547a
TASK: Update yarn to latest
Sebobo 1de4548
BUGFIX: Solve phpstan issues
Sebobo b959178
TASK: Update github action images
Sebobo d069f88
TASK: Remove commented code
Sebobo 10358f2
TASK: Set desired phpstan version for CI
Sebobo 79a03e2
TASK: Prevent lockfile changes in CI
Sebobo dee7661
TASK: Solve linting issues
Sebobo e8e9481
BUGFIX: Asset collection mutations
Sebobo 324e36c
TASK: Implement basic mutation tests
Sebobo e79048f
TASK: More functional tests and fixes
Sebobo c104820
TASK: Unit tests CI step
Sebobo 02170aa
BUGFIX: Generate graphql schema with custom resolvers
Sebobo ec9fec2
TASK: Get testcafe e2e tests to run again
Sebobo 2fc1d73
TASK: Resolve linter issue
Sebobo ffb0fee
TASK: Fix dns resolver issue with testcafe
Sebobo f741467
TASK: Configure baseuri for e2e tests
Sebobo 56e6dff
TASK: Start dev server in CI with tsx
Sebobo 15eb7a2
TASK: Hide create schema command in command list
Sebobo 1b7cc34
TASK: Fix codestyle
Sebobo 6246482
TASK: Revert some temporary changes from development
Sebobo d9ff8b1
TASK: Bump phpstan level to 3
Sebobo b982378
BUGFIX: Allow removing items from clipboard again
Sebobo 5747bec
BUGFIX: Only flush clipboard if confirmed
Sebobo b813187
TASK: Update compiled assets
Sebobo 13919ca
TASK: Apply suggestions from code review
Sebobo 7cf7f27
TASK: Better explain custom resolvers
Sebobo e980301
TASK: Remove unused code
Sebobo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "extension": ["ts"], | ||
| "spec": "Resources/Private/JavaScript/**/*.spec.ts", | ||
| "spec": "packages/**/*.spec.ts", | ||
| "require": "ts-node/register" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 16 | ||
| 22 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,20 @@ | ||
| { | ||
| "browsers": { | ||
| "path": "chromium", | ||
| "path": "firefox", | ||
| "cmd": "--window-size=1280,720" | ||
| }, | ||
| "src": ["Resources/Private/JavaScript/media-module/tests/**/*.ts"], | ||
| "appCommand": "yarn ts-node --project Resources/Private/JavaScript/dev-server/tsconfig.json Resources/Private/JavaScript/dev-server/src/server.ts", | ||
| "src": ["packages/media-module/tests/**/*.ts"], | ||
| "appCommand": "yarn dev:test", | ||
| "appInitDelay": 2000, | ||
| "screenshots": { | ||
| "takeOnFails": true | ||
| }, | ||
| "debugOnFail": false, | ||
| "stopOnFirstFail": true, | ||
| "hostname": "localhost", | ||
| "hostname": "127.0.0.1", | ||
| "baseUrl": "http://127.0.0.1:8000", | ||
| "retryTestPages": true, | ||
| "pageLoadTimeout": 10000, | ||
| "pageRequestTimeout": 60000, | ||
| "skipJsErrors": { | ||
| "stack": "/.*chrome-extension.*/ig" | ||
| } | ||
| "skipJsErrors": true | ||
| } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Flowpack\Media\Ui\Command; | ||
|
|
||
| /* | ||
| * This file is part of the Flowpack.Media.Ui package. | ||
| * | ||
| * (c) Contributors of the Neos Project - www.neos.io | ||
| * | ||
| * This package is Open Source Software. For the full copyright and license | ||
| * information, please view the LICENSE file which was distributed with this | ||
| * source code. | ||
| */ | ||
|
|
||
| use Flowpack\Media\Ui\GraphQL\MediaApi; | ||
| use Flowpack\Media\Ui\GraphQL\Middleware\GraphQLMiddleware; | ||
| use Neos\Flow\Annotations as Flow; | ||
| use Neos\Flow\Cli\CommandController; | ||
| use Neos\Flow\Package\PackageManager; | ||
| use Neos\Utility\Files; | ||
| use Wwwision\TypesGraphQL\GraphQLGenerator; | ||
|
|
||
| #[Flow\Scope('singleton')] | ||
| class MediaUiCommandController extends CommandController | ||
| { | ||
|
|
||
| #[Flow\Inject] | ||
| protected PackageManager $packageManager; | ||
|
|
||
| /** | ||
| * @var GraphQLMiddleware | ||
| */ | ||
| #[Flow\Inject('Flowpack.Media.Ui:GraphQLMiddleware')] | ||
| protected $mediaApiMiddleware; | ||
|
|
||
| /** | ||
| * @internal only for development | ||
| */ | ||
| public function createSchemaCommand(): void | ||
| { | ||
| $this->outputLine('Creating GraphQL schema...'); | ||
|
|
||
| $generator = new GraphQLGenerator(); | ||
| $schema = $generator->generate( | ||
| MediaApi::class, | ||
| $this->mediaApiMiddleware->getCustomResolvers(), | ||
| )->render(); | ||
|
|
||
| $path = Files::concatenatePaths([ | ||
| $this->packageManager->getPackage('Flowpack.Media.Ui')->getPackagePath(), | ||
| 'Resources', | ||
| 'Private', | ||
| 'GraphQL', | ||
| 'schema.root.graphql', | ||
| ]); | ||
|
|
||
| file_put_contents($path, $schema); | ||
|
|
||
| $this->outputFormatted('GraphQL schema created at: %s', [$path]); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.