Apollo-server中使用参数时,无法在字段级别使用Cypher语句。
创始人
2024-09-09 06:31:28
0

需要将参数放在函数中,然后再使用 Cypher 语句。

示例代码:

const neo4jgraphql = require('neo4j-graphql-js');
const { makeAugmentedSchema } = require('neo4j-graphql-js');
const {ApolloServer} = require('apollo-server-express');
const express = require('express');
const typeDefs = `
  type Movie {
    title: String!
    year: String!
  }

  type Query {
    movies(title: String): [Movie]
  }
`;
const schema = makeAugmentedSchema({ typeDefs });
const server = new ApolloServer({
  schema,
  context: ({ req }) => ({
    driver,
    req
  })
});

const graphqlHandler = neo4jgraphql;

const app = express();
server.applyMiddleware({ app });

app.listen({ port: 4000 }, () => {
  console.log(`�  Server ready at http://localhost:4000${server.graphqlPath}`)
});

相关内容

热门资讯

透视安装!aapoker俱乐部... 透视安装!aapoker俱乐部靠谱吗,aapoker辅助工具免费下载,盘点十款(有挂技巧)1、在aa...
透视教程!wepoker底牌透... 透视教程!wepoker底牌透视脚本下载,pokemmo辅助官网,wepoke教程(都是存在有挂);...
透视肯定!wepoekr底牌透... 透视肯定!wepoekr底牌透视,aapoker透视软件,推荐攻略(有挂黑科技)1、每一步都需要思考...
透视安卓版!aapoker辅助... 透视安卓版!aapoker辅助工具存在吗,拱趴大菠萝作弊方法,力荐教程(真是存在有挂);wpk透视辅...
透视系统!智星菠萝辅助,hhp... 透视系统!智星菠萝辅助,hhpoker透视下载链接在哪里,如何分辨真伪(有挂方法)1、起透看视 hh...
透视透视!aapoker免费透... 透视透视!aapoker免费透视脚本,hhpoker软件靠谱吗,新2025教程(先前有挂);免费aa...
透视好友!智星德州菠萝插件官网... 透视好友!智星德州菠萝插件官网,aapoker辅助器是真的吗,2024教程(有挂技巧);是一款可以让...
透视智能ai!wpk有没有脚本... 透视智能ai!wpk有没有脚本,德扑圈透视,详细教程(往昔真的是有挂);建议优先通过wpk有没有脚本...
透视实锤!hhpoker透视脚... 1、透视实锤!hhpoker透视脚本安卓,wepoker辅助器怎么用,揭秘关于(有挂攻略);该软件可...
透视了解!wepoker辅助器... 【福星临门,好运相随】;透视了解!wepoker辅助器下载,佛手大菠萝有挂吗,攻略教程(先前真的有挂...