apollo-server

Access docker container from another docker container

做~自己de王妃 提交于 2020-03-25 16:03:14
问题 I have following services in separate containers as you can see in the docker-composer.yml file. I'm unable to link one service to another. I'm trying to access service, built on node exposing on port 7100, in gms-api-gateway on network bridge. But connection is being refused. docker-compose.yml version: '3' services: gms-api-gateway: restart: always links: - gms-customers networks: - backend build: dockerfile: Dockerfile.dev context: ./gms-api-gateway depends_on: - gms-customers ports: -

Apollo Server on Ubuntu 18.04 EC2 instance with HTTPS

二次信任 提交于 2020-03-06 10:57:48
问题 i'm trying to deploy my simple apollo-server on an Ubuntu 18.04 instance from Amazon Web Services(AWS) EC2. It works fine, but i need/want the traffic to be over HTTPS instead. I was wondering which could be the best option. Im running the code with "forever"("forever start lib/index.js"), also using yarn (to start the project "yarn start"). I'm able to access the server with the ip address () and everything works fine. I would like to do it ASAP, already tried with apollo-server-lambda and

Use number as key in GraphQL Schema?

我与影子孤独终老i 提交于 2020-02-03 23:38:31
问题 Can you use numbers as a key in GraphQL Schema using the GraphQL Schema Language? i.e. (this is a small snippet...) type tax_code_allocation_country_KOR_states { "11": tax_code_allocation_state_tax_query "26": tax_code_allocation_state_tax_query "27": tax_code_allocation_state_tax_query } OR the below, which I realise is incorrect JSON: type tax_code_allocation_country_KOR_states { 11: tax_code_allocation_state_tax_query 26: tax_code_allocation_state_tax_query 27: tax_code_allocation_state

Use number as key in GraphQL Schema?

ぃ、小莉子 提交于 2020-02-03 23:38:13
问题 Can you use numbers as a key in GraphQL Schema using the GraphQL Schema Language? i.e. (this is a small snippet...) type tax_code_allocation_country_KOR_states { "11": tax_code_allocation_state_tax_query "26": tax_code_allocation_state_tax_query "27": tax_code_allocation_state_tax_query } OR the below, which I realise is incorrect JSON: type tax_code_allocation_country_KOR_states { 11: tax_code_allocation_state_tax_query 26: tax_code_allocation_state_tax_query 27: tax_code_allocation_state

Apollo Subscription Resolver Never Activates?

旧街凉风 提交于 2020-01-25 23:55:47
问题 My component is calling a subscription query, but for some reason the subscription resolver isn't being accessed: a breakpoint in it is never activated . And yet on the client I get the GraphQL subscription error: "Subscription must return Async Iterable. Received: undefined" What could be causing this? Thanks in advance to all for any info. SUBSCRIPTION QUERY const IM_SUBSCRIPTION_QUERY = gql` subscription getIMsViaSubscription($fromID: String!, $toID: String!){ IMAdded(fromID:$fromID, toID:

Increasing body limit size in apollo-server-express

若如初见. 提交于 2020-01-24 11:27:48
问题 I am trying to upload files to a webservice using the Upload scalar in apollo-server-express. I can upload small files(10s of kbs) to the webservice but am having trouble getting larger files to send. I did some searching and found that I can change the body size limit using the body-parser package, along with the bodyParserConfig option set in middleware. I've tried implementing this, as well as implementing it in the express app itself, however neither seem to be working. bodyParserConfig

Undefined args on a mutation, using apollo-server

南楼画角 提交于 2020-01-22 03:27:04
问题 Im working with apollo-server, everything works as expetected but the mutation arguments are undefined when the mutation is called from the frontend. const express = require('express'); const morgan = require('morgan'); const { ApolloServer, gql } = require('apollo-server-express'); const mongoose = require('mongoose'); require('dotenv').config(); const app = express(); const typeDefs = gql` type msgFields { email: String! textarea: String! createdAt: String! } input MsgFieldsInput { email:

apollostack/graphql-server - how to get the fields requested in a query from resolver

余生长醉 提交于 2020-01-21 07:08:07
问题 I am trying to figure out a clean way to work with queries and mongdb projections so I don't have to retrieve excessive information from the database. So assuming I have: // the query type Query { getUserByEmail(email: String!): User } And I have a User with an email and a username , to keep things simple. If I send a query and I only want to retrieve the email, I can do the following: query { getUserByEmail(email: "test@test.com") { email } } But in the resolver, my DB query still retrieves

apollostack/graphql-server - how to get the fields requested in a query from resolver

戏子无情 提交于 2020-01-21 07:07:48
问题 I am trying to figure out a clean way to work with queries and mongdb projections so I don't have to retrieve excessive information from the database. So assuming I have: // the query type Query { getUserByEmail(email: String!): User } And I have a User with an email and a username , to keep things simple. If I send a query and I only want to retrieve the email, I can do the following: query { getUserByEmail(email: "test@test.com") { email } } But in the resolver, my DB query still retrieves

Apollo-Server-Express not receiving Upload Object

假如想象 提交于 2020-01-16 08:58:11
问题 I'm trying to upload a file using apollo-server-express and apollo-client. However, when the file object is passed to the resolver it is always empty. I can see the file on the client, but not the server side. How can I resolve this ? My Schema type File { id: ID path: String filename: String mimetype: String } extend type Query { getFiles: [File] } extend type Mutation { uploadSingleFile(file: Upload!): File } My Resolver Mutation: { uploadSingleFile: combineResolvers( isAuthenticated, async