cost 269 ms
GraphQL:查詢未能驗證

[英]GraphQL : Query failed to validate

我正在一個簡單的 java 程序中測試 graph-spqr 庫。 這是我到目前為止所做的: public class GraphQLResolver { private String status; private Integer price; @Gr ...

如何為突變成功響應添加屬性

[英]How can I add properties to the mutation successful response

我是graphql-spqr 的新手,所以我希望這是一個簡單的問題,但是即使經過長時間的搜索,我也找不到解決方案。 提示:在我的應用程序中,我使用 code-first/schema-last 方法,我喜歡graphql-spqr ,所以沒有從文件加載 schema.graphqls 。 我的 ...

GraphQL 聯盟:如何消費,而不是擴展

[英]GraphQL Federation: How To Consume, Not Extend

我有一個返回Product的服務,我可以通過 GraphQL Federation 在返回Review的服務中擴展它。 評論服務取決於Product ,這種解耦真是太棒了! 我還有一個訂單服務,它存儲(除其他外)具有productId的OrderItem : 現在我希望客戶也能夠直接 select ...

graphiQL 未顯示 GraphQL schmea(spring graphql-spqr)

[英]graphiQL not showing GraphQL schmea (spring graphql-spqr)

我正在使用 spring-boot 和 graphql-spqr。 GraphQL 查詢和突變工作。 但是 GraphiQL webfrontend 沒有在最右邊一列的“文檔資源管理器”中顯示架構。 為什么? 我的 graphql Controller@RestController public ...

GraphQL SPQR 獲取服務器端的所有字段

[英]GraphQL SPQR fetches all fields on the server side

我是 Spring Boot 的新手,我剛剛開始使用 graphql-spqr 進行 Spring Boot,因為它可以輕松引導 Java 項目。 但是,據我了解,GraphQL 基本上允許從數據庫中獲取選定的字段。 根據示例,我已經看到,graphql-spqr 庫中的這種選擇發生在客戶端。 有沒 ...

GraphQL 和 Spring 使用@PreAuthorize 的安全性?

[英]GraphQL and Spring Security using @PreAuthorize?

我在設置 spring 安全性和禁用/啟用對graphql服務的 jwt 身份驗證的基於角色的用戶的訪問時遇到問題。 所有其他REST端點都受到適當保護,並且JWT身份驗證和基於角色的授權工作正常。 到目前為止我所擁有的: 在我的WebSecurityConfigurerAdapter class ...

JWT 身份驗證 graphql-spqr 與 spring 安全

[英]JWT Authentication graphql-spqr with spring security

我在 spring 啟動應用程序中使用 graphql-spqr-spring-boot-starter,版本 0.0.5。 @GraphQLApi 和 @GraphQLQuery 工作正常,我也在 /gui 上獲取數據。 但正如許多人所面臨的那樣,我正在嘗試在 graphql 服務器調用上應用身 ...

Graphql Schema doku 使用 Input 自動顯示 Input type

[英]Graphql Schema doku displays Input type automatically with Input

如自述文件中所述,我添加了leagen/graphql-spqr。 在我們自定義實現 graphql 類型之前,例如 customtype.types.gql。 實施后,一切正常,除了被稱為 OperatorInput 的類型,在自動生成的 graphql 文檔中命名,如“OperatorInpu ...

我可以使用@GraphQLQuery 解析不在模型中的字段嗎

[英]Can I resolve fields that are not in the model with @GraphQLQuery

我們正在使用 graphql-spqr 從我們的 Java 后端 api 和模型生成 graphql 模式。 今天為了獲取產品,我們注釋了一個看起來像這樣的方法: 我們希望避免創建一個新端點來檢索 Product 中的額外字段。 有沒有辦法為不屬於模型的字段定義解析器? (注釋與否) 例 ...

如何使用 spqr-spring-boot-starter 在 graphql 中獲取模式文件?

[英]How to get a schema file in graphql using spqr-spring-boot-starter?

誰能幫助我如何使用 spqr-spring-boot-starter 獲取模式文件? 我在網上找了解決方案,發現了這個: How to get the generated scheme file.graphqls using SPQR? 但我不確定我應該為模式傳遞什么? 當我使用 spqr-spr ...

無法擺脫 graphql-spqr-spring-boot-starter 中的“獲取數據時異常(/{apiName})”

[英]Unable to get rid of 'Exception while fetching data(/{apiName})' in graphql-spqr-spring-boot-starter

我正在使用 'io.leangen.graphql' 的 'graphql-spqr-spring-boot-starter' 庫版本 0.0.4。 我可以自定義錯誤。 請參閱以下代碼和屏幕截圖以供參考: 楷模: 服務 class: 自定義異常 class: 但是,我不確定如何Exception ...

TypeMappingException:檢測到具有不同返回類型的操作“opName”的多個方法

[英]TypeMappingException: Multiple methods detected for operation “opName” with different return types

使用 graphql-spqr 和 Spring 引導,我正在嘗試運行該項目,但我遇到了這個: 我被重定向到這個尋求幫助: https://github.com/leangen/graphql-spqr/wiki/Errors#operation-with-multiple-resolver-met ...

我們如何從 GraphQL 的 RequestContextHolder 中獲取 GraphQL 的 HttpServletRequest(DefaultGlobalContext)(使用 graphql-spqr-spring-boot-starter)?

[英]How can we get HttpServletRequest(DefaultGlobalContext) for GraphQL from RequestContextHolder for GraphQL (using graphql-spqr-spring-boot-starter)?

我正在使用graphql-spqr-spring-boot-starter庫將現有的 Rest API 項目遷移到 GraphQL。 我有一段代碼可以從RequestContextHolder中為 Rest API 獲取當前的HttpServletRequest : 但是,這將為 GraphQL ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM