| curl -vvv -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -d @introspection-query.txt -o data/schema.json <URL-OF-YOUR-ENDPOINT> |
public static void main(String[] args) throws IOException, URISyntaxException { GraphQLServlet servlet = new GraphQLServlet(); querys.stream() .forEach(query -> servlet.bindQueryProvider(query)); mutations.stream() .forEach(mute -> servlet.bindMutationProvider(mute));
String schemaResult = servlet.executeQuery(INTROSPECTION_QUERY); Files.write(Paths.get(System.getProperty("target.path"), "schema.json"), schemaResult.getBytes()); }