Stitching graphql Service to local-nerdGraph
STEPS TO RUN Demo-service Demo-service-info:
-
JAVA 21
-
Maven project
-
Springboot-graphql service
-
DATASource: Inmempory : HashMAP
-
serverURl: http://localhost:8080/graphiql

-
PostMan: http://localhost:8080/graphql

Steps to run nerd-graph:
- make sure local-service which you want to stich is up and running : clone this app do run mvn clean intall and start the server
- make sure docker-desktop is installed from self-service
- https://source.datanerd.us/after/nerd-graph/wiki/Running-NerdGraph-in-%22Local-NerdGraph-Mode%22#generate-a-proxiesjson-file : add this proxy to forward the request to local-service
- nerd-graph.env file to be created
- Set SSH key if you're logging-in for the first time : https://www.geeksforgeeks.org/how-to-fix-support-for-password-authentication-was-removed/
- git clone : git clone git@source.datanerd.us:after/nerd-graph.git under localNerdGraph
- ./install-cert-osx (since we are running in local make sure newrelic.com certs are downloaded to keyChain
- login to vault : newrelic-vault us login -method=oidc
- ./configure : add your local service config
6. run .start to start local-nerd-graph
7. stitched schemas(query-mutations) are visible under nerd-graph :
query: stitched under actor kindly refer the queryResolver of the demo app schema:

Mutations:
here: https://staging-one.newrelic.com/nerdgraph-graphiql?use_local_service=public-nerd-graph!3100,public-one-nerd-graph!3100,public-rpm-api!3200 :
pointing to locally running nerd-graph
you can verify the same in proxies.json and nerd-graph.env: