akieling commented on issue #1403: Failed to read a GraphQL query from a 
ConfigMap
URL: https://github.com/apache/camel-k/issues/1403#issuecomment-612863354
 
 
   Yep, there seems to be an issue with the parser when the property values 
contain double curly braces. About my example, thanks for letting me know that 
I should be using the `--resource` flag to expose the GraphQL query file to the 
app. It's working fine the following way:
   
   Command
   ```
   kamel run hello.groovy --resource hello.graphql
   ```
   
   hello.groovy
   ```
   from('timer:tick?period=10s')
       
.to("graphql://https://countries.trevorblades.com/?queryFile=hello.graphql";)
       .to('log:info')
   ```
   
   hello.graphql
   ```
   query Continents {
     continents {
       code
       name
     }
   }
   ```
   
   Output
   ```
   ...
   2020-04-13 11:31:11.324 INFO  [Camel (camel-k) thread #1 - 
timer://tick] info - Exchange[ExchangePattern: InOnly, BodyType: String, Body: 
{"data":{"continents":[{"code":"AF","name":"Africa"},{"code":"AN","name":"Antarctica"},{"code":"AS","name":"Asia"},{"code":"EU","name":"Europe"},{"code":"NA","name":"North
 America"},{"code":"OC","name":"Oceania"},{"code":"SA","name":"South 
America"}]}}]
   ...
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to