1
我想保存我的查詢在外部文件中,讓我們說:Graphql運行從一組多個查詢的某個查詢 - ApolloClient
query GetAllTodos {
todos{
_id
todoMessage
createdAt
}
}
query GetAllTests {
tests
}
是否有可能以某種方式加載整個文件中的一個字符串將字符串傳遞給ApolloClient並選擇我要執行什麼樣的查詢,如:
apollo.query({query: gql([allQueries])}, select: 'TodoQuery').then(({data})=>data);
是否可以與任何其他客戶端做到這一點?沒有必要阿波羅。