@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-07T23:47:01.040Z") @Stability(value=Experimental) public class GraphqlApi extends GraphqlApiBase
Example:
GraphqlApi api = GraphqlApi.Builder.create(this, "Api")
.name("demo")
.build();
ObjectType demo = ObjectType.Builder.create("Demo")
.definition(Map.of(
"id", GraphqlType.string(BaseTypeOptions.builder().isRequired(true).build()),
"version", GraphqlType.string(BaseTypeOptions.builder().isRequired(true).build())))
.build();
api.addType(demo);
| Modifier and Type | Class and Description |
|---|---|
static class |
GraphqlApi.Builder
(experimental) A fluent builder for
GraphqlApi. |
software.amazon.jsii.JsiiObject.InitializationModeIGraphqlApi.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
GraphqlApi(software.constructs.Construct scope,
String id,
GraphqlApiProps props) |
protected |
GraphqlApi(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
GraphqlApi(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
ObjectType |
addMutation(String fieldName,
ResolvableField field)
(experimental) Add a mutation field to the schema's Mutation.
|
ObjectType |
addQuery(String fieldName,
ResolvableField field)
(experimental) Add a query field to the schema's Query.
|
Boolean |
addSchemaDependency(CfnResource construct)
(experimental) Add schema dependency to a given construct.
|
ObjectType |
addSubscription(String fieldName,
ResolvableField field)
(experimental) Add a subscription field to the schema's Subscription.
|
void |
addToSchema(String addition)
(experimental) Escape hatch to append to Schema as desired.
|
void |
addToSchema(String addition,
String delimiter)
(experimental) Escape hatch to append to Schema as desired.
|
IIntermediateType |
addType(IIntermediateType type)
(experimental) Add type to the schema.
|
static IGraphqlApi |
fromGraphqlApiAttributes(software.constructs.Construct scope,
String id,
GraphqlApiAttributes attrs)
(experimental) Import a GraphQL API through this function.
|
String |
getApiId()
(experimental) an unique AWS AppSync GraphQL API identifier i.e.
|
String |
getApiKey()
(experimental) the configured API key, if present.
|
String |
getArn()
(experimental) the ARN of the API.
|
String |
getGraphqlUrl()
(experimental) the URL of the endpoint created by AppSync.
|
List<AuthorizationType> |
getModes()
(experimental) The Authorization Types for this GraphQL Api.
|
String |
getName()
(experimental) the name of the API.
|
Schema |
getSchema()
(experimental) the schema attached to this api.
|
Grant |
grant(IGrantable grantee,
IamResource resources,
String... actions)
(experimental) Adds an IAM policy statement associated with this GraphQLApi to an IAM principal's policy.
|
Grant |
grantMutation(IGrantable grantee,
String... fields)
(experimental) Adds an IAM policy statement for Mutation access to this GraphQLApi to an IAM principal's policy.
|
Grant |
grantQuery(IGrantable grantee,
String... fields)
(experimental) Adds an IAM policy statement for Query access to this GraphQLApi to an IAM principal's policy.
|
Grant |
grantSubscription(IGrantable grantee,
String... fields)
(experimental) Adds an IAM policy statement for Subscription access to this GraphQLApi to an IAM principal's policy.
|
addDynamoDbDataSource, addDynamoDbDataSource, addElasticsearchDataSource, addElasticsearchDataSource, addHttpDataSource, addHttpDataSource, addLambdaDataSource, addLambdaDataSource, addNoneDataSource, addNoneDataSource, addOpenSearchDataSource, addOpenSearchDataSource, addRdsDataSource, addRdsDataSource, addRdsDataSource, createResolverapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcegetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackgetNodeprotected GraphqlApi(software.amazon.jsii.JsiiObjectRef objRef)
protected GraphqlApi(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public GraphqlApi(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
GraphqlApiProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public static IGraphqlApi fromGraphqlApiAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull GraphqlApiAttributes attrs)
scope - scope. This parameter is required.id - id. This parameter is required.attrs - GraphQL API Attributes of an API. This parameter is required.@Stability(value=Experimental) @NotNull public ObjectType addMutation(@NotNull String fieldName, @NotNull ResolvableField field)
type Mutation { fieldName: Field.returnType }
fieldName - the name of the Mutation. This parameter is required.field - the resolvable field to for this Mutation. This parameter is required.@Stability(value=Experimental) @NotNull public ObjectType addQuery(@NotNull String fieldName, @NotNull ResolvableField field)
type Query { fieldName: Field.returnType }
fieldName - the name of the query. This parameter is required.field - the resolvable field to for this query. This parameter is required.@Stability(value=Experimental) @NotNull public Boolean addSchemaDependency(@NotNull CfnResource construct)
addSchemaDependency in interface IGraphqlApiaddSchemaDependency in class GraphqlApiBaseconstruct - the dependee. This parameter is required.@Stability(value=Experimental) @NotNull public ObjectType addSubscription(@NotNull String fieldName, @NotNull ResolvableField field)
type Subscription { fieldName: Field.returnType }
fieldName - the name of the Subscription. This parameter is required.field - the resolvable field to for this Subscription. This parameter is required.@Stability(value=Experimental)
public void addToSchema(@NotNull
String addition,
@Nullable
String delimiter)
Will always result in a newline.
Default: - ''
addition - the addition to add to schema. This parameter is required.delimiter - the delimiter between schema and addition.@Stability(value=Experimental)
public void addToSchema(@NotNull
String addition)
Will always result in a newline.
Default: - ''
addition - the addition to add to schema. This parameter is required.@Stability(value=Experimental) @NotNull public IIntermediateType addType(@NotNull IIntermediateType type)
type - the intermediate type to add to the schema. This parameter is required.@Stability(value=Experimental) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull IamResource resources, @NotNull String... actions)
grantee - The principal. This parameter is required.resources - The set of resources to allow (i.e. ...:[region]:[accountId]:apis/GraphQLId/...). This parameter is required.actions - The actions that should be granted to the principal (i.e. appsync:graphql ). This parameter is required.@Stability(value=Experimental) @NotNull public Grant grantMutation(@NotNull IGrantable grantee, @NotNull String... fields)
grantee - The principal. This parameter is required.fields - The fields to grant access to that are Mutations (leave blank for all). This parameter is required.@Stability(value=Experimental) @NotNull public Grant grantQuery(@NotNull IGrantable grantee, @NotNull String... fields)
grantee - The principal. This parameter is required.fields - The fields to grant access to that are Queries (leave blank for all). This parameter is required.@Stability(value=Experimental) @NotNull public Grant grantSubscription(@NotNull IGrantable grantee, @NotNull String... fields)
grantee - The principal. This parameter is required.fields - The fields to grant access to that are Subscriptions (leave blank for all). This parameter is required.@Stability(value=Experimental) @NotNull public String getApiId()
getApiId in interface IGraphqlApigetApiId in class GraphqlApiBase@Stability(value=Experimental) @NotNull public String getArn()
getArn in interface IGraphqlApigetArn in class GraphqlApiBase@Stability(value=Experimental) @NotNull public String getGraphqlUrl()
@Stability(value=Experimental) @NotNull public List<AuthorizationType> getModes()
@Stability(value=Experimental) @NotNull public String getName()
@Stability(value=Experimental) @NotNull public Schema getSchema()
@Stability(value=Experimental) @Nullable public String getApiKey()
Default: - no api key
Copyright © 2022. All rights reserved.