Sometimes, you want to resues object type when doing mutation, you can use 'input' type to help:

input MessageInput {
content: String
author: String
} type Message {
id: ID!
content: String
author: String
} type Query {
getMessage(id: ID!): Message
} type Mutation {
createMessage(input: MessageInput): Message
updateMessage(id: ID!, input: MessageInput): Message
}

Doc

[GraphQL] Mutations and Input Types的更多相关文章

  1. pandas-11 TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely错误解决方法

    pandas-11 TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be sa ...

  2. [GraphQL] Create an Input Object Type for Complex Mutations

    When we have certain mutations that require more complex input parameters, we can leverage the Input ...

  3. 【HTML】Advanced6:HTML5 Forms Pt. 1: Input Types

    1.Not yet work fully on all major browsers 2.<input type="search tel url email datetime date ...

  4. js-jquery-SweetAlert2【三】INPUT TYPES

    1.text swal({ title: 'Input something', input: 'text', showCancelButton: true, inputValidator: funct ...

  5. tpot ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

    机器学习训练的时候报出这个问题 是因为dataframe中的数据类型有一个是‘object’,把它转成int,或float 就行,如下 df['A'] = df['A‘].astype(int) 参考 ...

  6. GraphQL:一种不同于REST的接口风格

    从去年开始,JS算是完全踏入ES6时代.在React相关项目中接触到了一些ES6的语法.这次接着GraphQL这种新型的接口风格,从后端的角度接触ES6. 这篇文章从ES6的特征讲起,打好语法基础:然 ...

  7. Vue + GraphQL初试

    基本用法 GraphQL概述 GraphQL基本语法特性 GraphQL类型系统 GraphQL类型系统内置基础类型 GraphQL类型系统内置修饰符 GraphQL工作原理 GraphQL执行过程 ...

  8. grandstack graphql 工具基本试用

      grandstack 是一个方便graphql 应用开发的工具 使用docker-compose 运行 环境准备 官方的starter 比较好,已经是使用docker-compose 创建好了所有 ...

  9. Spring Boot GraphQL 实战 02_增删改查和自定义标量

    hello,大叫好,我是小黑,又和大家见面啦~ 今天我们来继续学习 Spring Boot GraphQL 实战,我们使用的框架是 https://github.com/graphql-java-ki ...

随机推荐

  1. oc7--内存分析

    // // main.m // 第二个OC类 #import <Foundation/Foundation.h> @interface Person : NSObject { @publi ...

  2. 利用SharedPreferences完成记住账号密码的功能

    利用SharedPreferences完成记住账号密码的功能 效果图: 记住密码后,再次登录就会出现账号密码,否则没有. 分析: SharedPreferences可将数据存储到本地的配置文件中 Sh ...

  3. 深入解析Dropout——基本思想:以概率P舍弃部分神经元,其它神经元以概率q=1-p被保留,舍去的神经元的输出都被设置为零

    深度学习网络大杀器之Dropout——深入解析Dropout  转自:https://yq.aliyun.com/articles/68901 摘要: 本文详细介绍了深度学习中dropout技巧的思想 ...

  4. hdoj--5621--KK's Point(简单数学)

    KK's Point Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total ...

  5. 【IOI 1994】 The Buses

    [题目链接] http://poj.org/problem?id=1167 [算法] 深度优先搜索 + 迭代加深 [代码] #include <algorithm> #include &l ...

  6. Bootstrap 模态框使用

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  7. Android View事件分发与传递

    在Android中,人们主要通过手指与系统交互.Android把所有的touch事件都被封装成MotionEvent来进行处理,其中包括了手指点击的位置,时间等信息.其事件类型主要包括:ACTION_ ...

  8. 图像的全局特征--LBP特征

    原文链接:http://blog.csdn.net/zouxy09/article/details/7929531#comments 这个特征或许对三维图像特征提取有很大作用.文章有修改,如有疑问,请 ...

  9. 基准测试-jmeter压力测试activeMQ之一环境安装配置

    jmeter压力测试activeMQ 摘要:linux(CentOS)单机activeMQ安装.window(2008Server)Jmeter配置activeMQ包.Jmeter配置linux监控 ...

  10. js页面传值,cookie

    // 获取页面穿值 function GetQueryString(name) { var reg = new RegExp("(^|&)" + name + " ...