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

Question: How to integrate with IntelliJ Idea for automatic code regeneration on branches switch? #179

Open
MateuszStefek opened this issue Aug 29, 2024 · 0 comments

Comments

@MateuszStefek
Copy link

W use the following plugin configuration. Everything works great, incremental compilation works fine.

However, whenever one developer modifies the code and another developer pulls the changes, they need to remember to run a mvn build, as the sources aren't automatically regenerated.

Is there a way to configure IntelliJ IDEA to automatically regenerate sources when the .graphqls files change?

			<plugin>
				<groupId>io.github.deweyjose</groupId>
				<artifactId>graphqlcodegen-maven-plugin</artifactId>
				<version>1.50</version>
				<executions>
					<execution>
						<goals>
							<goal>generate</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<schemaPaths>
						<param>src/main/resources/schema/schema.graphqls</param>
						<param>src/main/resources/schema/schema.foobar.graphqls</param>
					</schemaPaths>
					<packageName>foobar.graphql.schema</packageName>
					<outputDir>${project.build.directory}/generated-sources/java/graphql/generated</outputDir>
[...]
				</configuration>
			</plugin>
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

No branches or pull requests

1 participant