How to use apollo-env - 6 common examples

To help you get started, we’ve selected a few apollo-env examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apollographql / apollo-tooling / packages / apollo-graphql / src / schema / transformSchema.ts View on Github external
function replaceArgs(args: GraphQLFieldConfigArgumentMap) {
    return mapValues(args, arg => ({
      ...arg,
      type: replaceType(arg.type)
    }));
  }
}
github apollographql / apollo-tooling / packages / apollo-graphql / src / schema / transformSchema.ts View on Github external
function replaceInputFields(
    fieldsMap: GraphQLInputFieldConfigMap
  ): GraphQLInputFieldConfigMap {
    return mapValues(fieldsMap, field => ({
      ...field,
      type: replaceType(field.type)
    }));
  }
github apollographql / apollo-tooling / packages / apollo-graphql / src / schema / buildSchemaFromSDL.ts View on Github external
.flat();

    for (const { operation, type } of operationTypes) {
      operationTypeMap[operation] = type.name.value;
    }
  } else {
    operationTypeMap = {
      query: "Query",
      mutation: "Mutation",
      subscription: "Subscription"
    };
  }

  schema = new GraphQLSchema({
    ...schema.toConfig(),
    ...mapValues(operationTypeMap, typeName =>
      typeName
        ? (schema.getType(typeName) as GraphQLObjectType)
        : undefined
    )
  });

  for (const module of modules) {
    if (!module.resolvers) continue;
    addResolversToSchema(schema, module.resolvers);
  }

  return schema;
}
github apollographql / apollo-tooling / packages / apollo-graphql / src / schema / transformSchema.ts View on Github external
function replaceFields(
    fieldsMap: GraphQLFieldConfigMap
  ): GraphQLFieldConfigMap {
    return mapValues(fieldsMap, field => ({
      ...field,
      type: replaceType(field.type),
      args: field.args ? replaceArgs(field.args) : undefined
    }));
  }
github apollographql / apollo-tooling / packages / apollo-graphql / src / operationId.ts View on Github external
export function operationHash(operation: string): string {
  return createHash("sha256")
    .update(operation)
    .digest("hex");
}
github apollographql / apollo-server / packages / apollo-gateway / src / utilities / array.ts View on Github external
(accumulator, element, index, array) => {
      const result = callbackfn(element, index, array);
      if (isNotNullOrUndefined(result)) {
        accumulator.push(result);
      }
      return accumulator;
    },
    [] as U[],

apollo-env

MIT
Latest version published 3 years ago

Package Health Score

67 / 100
Full package analysis

Similar packages