小编lee*_*ang的帖子

GraphQL错误字段类型必须是输入类型,但得到:

这是突变:

const createNotebook = mutationWithClientMutationId ({
    name: 'CreateNotebook',
    inputFields: {
        token: {
            type: GraphQLString,
        },

        details: {
            type: NotebookDetails,
        },
    },
    outputFields: {

    },
    async mutateCRNotebook(input, context) {
        const data = getJSONFromRelativeURL(input.token);

    },
});
Run Code Online (Sandbox Code Playgroud)

以下是突变详细信息字段中使用的模式:

const NotebookDetails = new GraphQLObjectType({
    name: 'NotebookDetails',
    interfaces: [nodeInterface],

    fields: () => ({
        id: globalIdField('NotebookDetails'),

        description: {
            type: GraphQLString,
            description: '...',
            resolve(obj) {
                return obj.description;
            },
        },

        language: {
            type: GraphQLString,
            description: '...',
            resolve(obj) {
                return obj.language;
            },
        },

    }),

});
Run Code Online (Sandbox Code Playgroud)

我在运行此代码时出错:

api_1    | Error: …
Run Code Online (Sandbox Code Playgroud)

javascript graphql

20
推荐指数
3
解决办法
1万
查看次数

无法添加firebase到Android应用程序

我想在我的应用程序中添加firebase以进行推送通知.我已经按照firebase文档进行了操作:

root/app/build.gradle:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.google.firebase:firebase-core:9.0.2'
}

apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)

root/build.gradle:

dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
        classpath 'com.google.gms:google-services:3.0.0'
    }
Run Code Online (Sandbox Code Playgroud)

我还在root/appdir中添加了google-services.json .在尝试同步项目时,出现错误:

错误:(25,13)无法解决:com.google.firebase:firebase-core:9.0.2

我不明白为什么会出现这个错误.我该如何解决?

android firebase

5
推荐指数
2
解决办法
5731
查看次数

在Android Studio中运行项目时出错

我使用的是Android Studio v2.2.0.12.我创建了一个新的应用程序,但是当我构建它时,它会卡在这个gradle Build Running步骤上.

在此输入图像描述

终端的输出是:

[  22589]   WARN - radle.project.ProjectSetUpTask -  
[  22675]   WARN - roid.tools.ndk.GradleWorkspace - NDK support for project 'plaid' is disabled because the project doesn't contain any valid native configurations. 
[  29788]   WARN - roid.tools.ndk.GradleWorkspace - NDK support for project 'Discover-Delhi' is disabled because the project doesn't contain any valid native configurations. 
[  35374]   WARN - s.idea.run.util.MultiUserUtils - Error parsing output of `am get-current-user`: usage: am [subcommand] [options]
usage:... 
Loading library manifest /home/cortana/AndroidProjects/FirstApp/app/src/main/nevercreated.xml
Merging …
Run Code Online (Sandbox Code Playgroud)

android

5
推荐指数
0
解决办法
2149
查看次数

包含c ++项目中的dlib库时出错

我需要在c ++项目中包含dlib.我已经在我的Makefile中正确链接了库.这是Makefile:

EXE = face_frontalization
OBJ_DIR = bin

CFLAGS = -g -w
# CXXFLAGS = -w -Wall -Wextra -g -std=c++0x
# LDFLAGS = -lSDL2 -lSDL2_image -lSDL2_ttf -lSDL2_mixer -lSDL2_gfx -lm

dummy_build_folder := $(shell mkdir -p $(OBJ_DIR))

 # c++ source files of the project
CXXFILES = $(shell find src -type f -name '*.cpp')
CXXOBJ = $(patsubst src/%.cpp,bin/%.o,$(CXXFILES))

INCLUDE = -I/usr/include/dlib-18.18
LIBS = `pkg-config --libs opencv`
CXXFLAGS = `pkg-config --cflags opencv` -w -Wall -Wextra -g -std=c++0x
LDFLAGS = -lcurl
CFLAGS = `pkg-config --cflags …
Run Code Online (Sandbox Code Playgroud)

c++ makefile dlib

0
推荐指数
1
解决办法
4699
查看次数

标签 统计

android ×2

c++ ×1

dlib ×1

firebase ×1

graphql ×1

javascript ×1

makefile ×1