SegmentFault apollo-server的问题2022-10-27T09:29:02+08:00https://segmentfault.com/feeds/tag/apollo-serverhttps://creativecommons.org/licenses/by-nc-nd/4.0/Apollo server 搭建的 graphql 服务端, 怎么部署在腾讯云还是阿里云? Serverless应用?https://segmentfault.com/q/10100000426982692022-10-27T09:29:02+08:002022-10-27T09:29:02+08:00user_rMCgwx4Qhttps://segmentfault.com/u/user_rmcgwx4q0<p>外网上搜的, Heroku在国内用不了, vercel可以用,但是vercel的serverless function免费用户只能用12次:</p><pre><code>Build Failed
No more than 12 Serverless Functions can be added to a Deployment on the Hobby plan. Create a team (Pro plan)...</code></pre><p>阿里云和腾讯云不知道对应的是哪一个?</p>如何使用GraphQL直连数据库?https://segmentfault.com/q/10100000410257342021-11-27T05:35:22+08:002021-11-27T05:35:22+08:00sdasfd_xuhttps://segmentfault.com/u/sdasfd_xu0<p>Vue是使用Apollo client来访问Apollo server从而获得数据<br>数据格式的定义也是在Apollo server完成的</p><p>但是我并不需要这个中间的服务器,我只想客户端或者网页直接访问我本地的数据库,而且是因为图形数据库无法内嵌我才不得已使用数据库服务器,现在再加上一个服务器很难接受<br>关键是数据格式的定义也是在服务器完成的,而我想在客户端中让用户自定义显示哪些数据(像notion,airtable等在线数据库那样),甚至图形数据库的结构也在客户端定义</p><p>现在不仅额外有两个服务器进程,还无法热更新数据结构,虽然之前也自己实现过类似于GraphQL的转译模块,但是一个人重新造这个轮子还是太吃力。</p><p>现在的需求是尽量减少额外服务器的数量,必须能热更新数据结构,我不知道Apollo是否有这个功能,或者说有其他库同时有GraphQL的客户端和服务器功能</p>nodejs使用typescript可不可以导入以.graphql结尾的文件来获取graphql的typeDefs?https://segmentfault.com/q/10100000401540312021-06-10T10:14:40+08:002021-06-10T10:14:40+08:00see311https://segmentfault.com/u/see3110<p>graphql文件如下</p><pre><code class="typescript">// schema.graphql
type Query{
helloWorld: String!
}</code></pre><p>想实现如下效果</p><pre><code class="typescript">import * as typeDefs from "src/schema/schema.graphql";
import { resolvers } from "src/schema/resolver";
const apolloServer = new ApolloServer({
typeDefs,
resolvers
})</code></pre><p>可以的话如何配置?<br>感谢</p>GraphQL中apollo-client,有什么用处呢 https://segmentfault.com/q/10100000198117332019-07-19T13:33:05+08:002019-07-19T13:33:05+08:00芙兰朵露https://segmentfault.com/u/landuolu0<p>在前端项目中直接 用ajax 然后参数 就是query查询语句可以获得结果,前端为啥还要用apollo-client呢</p>