Mattermark GQL端点引发HystrixRuntimeException

时间:2019-01-24 18:36:21

标签: graphql

尝试通过以下方式访问Mattermark GQL API:

curl -X POST \
 https://eapi.mattermark.com/graphql \
 -H 'Accept: application/json' \
 -H 'Authorization: Bearer AUTH_TOKEN' \
 -H 'Content-Type: application/graphql' \
 -H 'Postman-Token: POSTMAN_TOKEN' \
 -H 'cache-control: no-cache' \
 -d 'query{organizations(ids:["233333"]){id name description estFounded mobileDownloads revenueRange socialAccounts{urn profileUrl}acquisitions{date organization{id name}}acquiredBy{date organization{id name}}companyPersona{companyStage totalFunding{value}}domains{domain estimatedMonthlyUniques{current}}businessModels{name}industries{name}offices{location{city{name}state{iso2}zip{code}country{iso3}}}fundingRounds{series amountRaised{value}fundingDate}organizationMetrics{employeeCounts{current}}}}'

上面的方法对于前9k个结果工作正常,但现在抛出此错误:

{
    "data": null,
    "errors": [
        {
            "locations": null,
            "errorType": "DataFetchingException",
            "message": "com.netflix.hystrix.exception.HystrixRuntimeException: GetCompanyCommand could not be queued for execution and no fallback available."
        }
    ]
}

似乎与GetCompoanyCommand有关,可能是在以下位置找到的HystrixCommand扩展:https://github.com/Netflix/Hystrix。处理容错/线程锁定。 有趣的是,它有效:

POST \
 https://eapi.mattermark.com/graphql \
 -H 'Accept: application/json' \
 -H 'Authorization: Bearer AUTH_TOKEN' \
 -H 'Content-Type: application/graphql' \
 -H 'Postman-Token: POSTMAN_TOKEN' \
 -H 'cache-control: no-cache' \
 -d 'query{organizations(ids:["233333"]){id}}

但是尝试获取任何其他属性失败。

有什么主意为何物标会锁定在这里?以及如何解决?

0 个答案:

没有答案