V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
TomVista
V2EX  ›  问与答

js graphql 这个语法是什么?

  •  
  •   TomVista · 2019-11-25 15:16:38 +08:00 · 970 次点击
    这是一个创建于 1604 天前的主题,其中的信息可能已经有所发展或是发生改变。
    const { ApolloServer, gql } = require('apollo-server-koa')
    
    const typeDefs = gql`
    type Query {
      hello: String
    }
    `
    

    上面的 gql+字符串模板,是个什么.

    第 1 条附言  ·  2019-11-25 16:03:23 +08:00
    已解决,感谢
    5 条回复    2019-11-25 15:39:30 +08:00
    wszgrcy
        1
    wszgrcy  
       2019-11-25 15:24:30 +08:00 via Android   ❤️ 1
    标签模板
    IsaacYoung
        2
    IsaacYoung  
       2019-11-25 15:26:30 +08:00
    函数调用
    optional
        3
    optional  
       2019-11-25 15:34:43 +08:00
    你再来个 console.log(typeDefs)就明白了
    ayase252
        5
    ayase252  
       2019-11-25 15:39:30 +08:00   ❤️ 1
    tagged template literals
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3168 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:33 · PVG 22:33 · LAX 07:33 · JFK 10:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.