How to add headers to the <schemaUrlHeaders></schemaUrlHeaders>?

1321
2
java

How to add headers to the <schemaUrlHeaders></schemaUrlHeaders>?

Hi, I want to generate a schema.json file. I have the configuration in my pom.xml like the below,

<execution>
	<id>example.id</id>
	<goals>
		<goal>generate</goal>
	</goals>
	<configuration>
		<introspectionFile>
							   ${project.basedir}/src/main/java/graphql/example/schema.json
							</introspectionFile>
		<generateIntrospectionFile>
								true
							</generateIntrospectionFile>
		<sourceDirName>
							   ${project.basedir}/src/main/java/graphql/example
							</sourceDirName>
		<schemaUrl>
								https://remoteurl
							</schemaUrl>
		<rootPackageName>
							   com.example
							</rootPackageName>
		<schemaUrlHeaders>
			<authorization>
									Bearer *****************************
								</authorization>
		</schemaUrlHeaders>
	</configuration>
</execution>	

I have added the authorization header inside the tag. But this is not working. I am getting "Not authorized" exception.

I have used this link as a reference.

I couldn't figure out, if there is a problem with the syntax. Can anyone provide me an example on how to use the tag. Thanks in advance.

sds

I have figured out, how to pass custom headers. It is working.

	<Authorization>

							Bearer *********************************

		</Authorization>