【问题标题】:How can I execute graphql in java?如何在 java 中执行 graphql?
【发布时间】:2019-12-16 02:39:05
【问题描述】:

我有这个 JSON。如何在 java 中将其执行到 commercetools?

String myJson = "{  
   "query Sphere":{  
      "products":{  
         "results":{  
            "masterData":{  
               "current":{  
                  "names":"locale(\"en\")"
               }
            }
         }
      }
   }
}";

【问题讨论】:

    标签: java json graphql commercetools


    【解决方案1】:

    Javadoc for the commercetools JVM SDK 中,您可以找到指向graphQL example 的链接。

    您使用结果类型作为类型参数实现SphereRequest,并在方法httpRequestIntent 中使用graphQL 字符串作为主体。

    【讨论】:

    • 你能在这里写一个例子吗?如果链接断开,答案将变得毫无用处。
    猜你喜欢
    • 2020-01-30
    • 2019-02-21
    • 2017-06-07
    • 2021-09-28
    • 2018-04-24
    • 2019-12-05
    • 1970-01-01
    • 2022-07-12
    • 2018-07-21
    相关资源
    最近更新 更多