apollo

Apollo Client: Network Error {“type”:“WriteError”}

给你一囗甜甜゛ 提交于 2020-01-24 22:42:09
问题 I am getting Network Error {"type":"WriteError"} on my apollo query. Query executes just fine as well as it arrives to the client. But there is issue writing it tot he store. Any ides what can be going wrong? This is the query: fragment BpmnProcessInstanceItemTask on BpmnTaskInstance { id dateStarted dateFinished task { name __typename } performer { name __typename } performerRoles __typename } fragment BpmnProcessInstanceItem on BpmnProcessInstance { id status process { name description type

How to update apollo cache after mutation (query with filter)

一曲冷凌霜 提交于 2020-01-24 22:20:26
问题 I am pretty new to GraphQL. I am using graph.cool in a Vue.js project with apollo. I am using right now the in-memory cache. I had previously a simple 'allPosts' query. And after creating a new one, I used the update() hook and readQuery() + writeQuery() However I want that logged in users can only see their posts. So I modified the query with a filter. query userStreams ($ownerId: ID!) { allStreams(filter: { owner: { id: $ownerId } }) { id name url progress duration watched owner { id } } }

Nuxt JS Apollo data only available after page refresh

六眼飞鱼酱① 提交于 2020-01-23 12:25:11
问题 I am fetching some data using Apollo inside of Nuxt. Somehow, when navigating to that page I get an error of Cannot read property 'image' of undefined When I refresh the page, everything works as expected. I have a found a few threads of people having similar issues but no solution seems to work for me :/ This is my template file right now: /products/_slug.vue <template> <section class="container"> <div class="top"> <img :src="product.image.url"/> <h1>{{ product.name }}</h1> </div> </section>

apollo 3 plus Watch dog

自闭症网瘾萝莉.ら 提交于 2020-01-23 03:50:59
变量定义 uint8_t g_ui8NumWatchdogInterrupts = 0; uint32_t g_ui32ResetStatus = 0; am_hal_wdt_config_t g_sWatchdogConfig = { // Select the Apollo 1 Clock Rate. .ui32Config = _VAL2FLD(WDT_CFG_CLKSEL, WDT_CFG_CLKSEL_128HZ) | AM_HAL_WDT_ENABLE_RESET | AM_HAL_WDT_ENABLE_INTERRUPT, // Set WDT interrupt timeout for 3/4 second. .ui16InterruptCount = 128 * 3 / 4, // Set WDT reset timeout for 1.5 seconds. .ui16ResetCount = 128 * 3 / 2 }; watch dog中断服务函数 //***************************************************************************** // // Interrupt handler for the watchdog. // //******************************

Is it possible to prevent `useLazyQuery` queries from being re-fetched on component state change / re-render?

送分小仙女□ 提交于 2020-01-22 14:52:09
问题 Currently I have a useLazyQuery hook which is fired on a button press (part of a search form). The hook behaves normally, and is only fired when the button is pressed. However, once I've fired it once, it's then fired every time the component re-renders (usually due to state changes). So if I search once, then edit the search fields, the results appear immediately, and I don't have to click on the search button again. Not the UI I want, and it causes an error if you delete the search text

Is it possible to prevent `useLazyQuery` queries from being re-fetched on component state change / re-render?

跟風遠走 提交于 2020-01-22 14:51:49
问题 Currently I have a useLazyQuery hook which is fired on a button press (part of a search form). The hook behaves normally, and is only fired when the button is pressed. However, once I've fired it once, it's then fired every time the component re-renders (usually due to state changes). So if I search once, then edit the search fields, the results appear immediately, and I don't have to click on the search button again. Not the UI I want, and it causes an error if you delete the search text

useLazyQuery causing too many re-renders [Apollo/ apollo/react hooks]

核能气质少年 提交于 2020-01-21 14:07:26
问题 I'm building a discord/slack clone. I have Channels, Messages and users. As soon as my Chat component loads, channels get fetched with useQuery hook from Apollo. By default when a users comes at the Chat component, he needs to click on a specific channels to see the info about the channel and also the messages. In the smaller Channel.js component I write the channelid of the clicked Channel to the apollo-cache. This works perfect, I use the useQuery hooks @client in the Messages.js component

Prisma(六)——Prisma ➕ Apollo ➕ Vue(vue中使用prisma)

吃可爱长大的小学妹 提交于 2020-01-21 01:17:59
到目前为止,我们知道 Prisma 是一个后端框架,那如何与 vue 项目结合起来呢❓嗯,没错,是 Apollo 。 vue-apollo 虽然没有 react-apollo 出名,但是也是很好用的,我们一起来看看 vue-apollo 👇👇👇 vue-apollo 安装 npm install vue - apollo graphql apollo - client apollo - link - http 创建 ApolloClient 实例 //导入安装的插件 import VueApollo from 'vue-apollo' import { ApolloClient } from 'apollo-client' import { createHttpLink } from 'apollo-link-http' //连接API的地址 const httpLink = createHttpLink ( { // 你需要在这里使用绝对路径(后端框架中的prisma.yml文件中endpoint地址) uri : 'http://localhost:4466' , } ) // 创建ApolloClient实例 const apolloClient = new ApolloClient ( { link : httpLink } ) 创建 VueApollo 实例 //

Apollo整合SpringBoot开发

≯℡__Kan透↙ 提交于 2020-01-19 21:00:36
创建项目 pom.xml <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-logging</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-log4j2</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId>

Apollo的快速入门

牧云@^-^@ 提交于 2020-01-17 12:35:09
一、准备工作 1.1 Java Apollo服务端:1.8+ Apollo客户端:1.7+ 由于Quick Start会在本地同时启动服务端和客户端,所以需要在本地安装Java 1.8+。 在配置好后,可以通过如下命令检查: java -version 样例输出: java version "1.8.0_74" Java(TM) SE Runtime Environment (build 1.8.0_74-b02) Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode) Windows用户请确保JAVA_HOME环境变量已经设置。 1.2 MySQL 版本要求:5.6.5+ Apollo的表结构对 timestamp 使用了多个default声明,所以需要5.6.5以上版本。 连接上MySQL后,可以通过如下命令检查: SHOW VARIABLES WHERE Variable_name = 'version'; Variable_name Value version 5.7.11 1.3 下载Quick Start安装包 我们准备好了一个Quick Start安装包,大家只需要下载到本地,就可以直接使用,免去了编译、打包过程。 安装包共50M,如果访问github网速不给力的话,可以从百度网盘下载。