How to use the graphql-compose.upperFirst function in graphql-compose

To help you get started, we’ve selected a few graphql-compose 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 graphql-compose / graphql-compose-elasticsearch / src / ElasticApiParser.js View on Github external
Object.keys(fields).forEach(k => {
      const names = k.split('.');
      if (names.length === 1) {
        result[names[0]] = fields[k];
      } else {
        if (!result[names[0]]) {
          result[names[0]] = {
            type: ObjectTypeComposer.createTemp({
              name: `${this.prefix}_${upperFirst(names[0])}`,
              fields: (() => {}: any),
            }),
            resolve: () => {
              return {};
            },
          };
        }
        result[names[0]].type.setField(names[1], fields[k]);
      }
    });
github graphql-compose / graphql-compose-aws / src / AwsServiceOperation.js View on Github external
getTypeName(): string {
    return `${this.prefix}${upperFirst(this.serviceId)}${upperFirst(this.name)}`;
  }
github graphql-compose / graphql-compose-aws / src / AwsServiceMetadata.js View on Github external
getPrefix(): string {
    return `Aws${upperFirst(this.metadata.endpointPrefix)}`;
  }
github graphql-compose / graphql-compose-aws / src / AwsService.js View on Github external
getTypeName(): string {
    return `${this.prefix}${upperFirst(this.serviceId)}`;
  }
github graphql-compose / graphql-compose-aws / src / AwsParam.js View on Github external
Object.keys(param.members).forEach(fname => {
        fields[fname] = this.convertParam(
          param.members[fname],
          `${name}${upperFirst(fname)}`,
          false,
          shapes
        );
      });
    }