Skip to content

1105 add graphQL schema file creation action #1123

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

Conversation

SilinMykola
Copy link
Contributor

Description (*)
Added ability to create a schema.graphqls file from the action menu.
image

Fixed Issues (if relevant)

  1. Fixes Add support for GraphQL schema of a module #1105

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with integration/functional tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@SilinMykola SilinMykola force-pushed the 1105-add-graphql-schema-file-create-action branch from f24d7e9 to 26b4206 Compare July 1, 2022 10:08
Copy link
Collaborator

@bohdan-harniuk bohdan-harniuk left a comment

Choose a reason for hiding this comment

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

Hello, @SilinMykola!

Thank you for your work!
Please, review my comment.

Regards,

public class GraphQLSchemaGenerator extends FileGenerator {

private final String moduleName;

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please, remove unnecessary empty line.

*/
public GraphQLSchemaGenerator(
final String moduleName,
final Project project) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please, reformat constructor:

Suggested change
final Project project) {
final Project project
) {

import com.intellij.lang.Language;
import com.jetbrains.php.lang.PhpLanguage;

public class GraphQLSchema implements ModuleFileInterface {
Copy link
Collaborator

Choose a reason for hiding this comment

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

All file models should have suffix File

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed


@Override
public Language getLanguage() {
return PhpLanguage.INSTANCE;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you use PhpLanguage.INSTANCE?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

import com.magento.idea.magento2plugin.actions.generation.generator.util.FindOrCreateGraphQLSchema;
import java.util.Properties;

public class GraphQLSchemaGenerator extends FileGenerator {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where did you use this generator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bohdan-harniuk Hi! Thanks for your review. I fixed. Please, check. Thanks!

@SilinMykola SilinMykola force-pushed the 1105-add-graphql-schema-file-create-action branch from 23eb924 to 0021f42 Compare July 1, 2022 13:15
Copy link
Collaborator

@bohdan-harniuk bohdan-harniuk left a comment

Choose a reason for hiding this comment

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

Great work! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for GraphQL schema of a module
2 participants