![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
amplience-graphql-codegen-json
Advanced tools
This is a plugin for GraphQL codegen that generates Amplience JSON schemas from your Graphql schema.
This is a plugin for GraphQL codegen that generates Amplience JSON schemas from your Graphql schema.
This plugin will look for Graphql types within your schema that contain an @amplienceContentType
directive and generate a JSON schema file for each type.
For more information on the Amplience JSON schemas see the documentation on amplience.com.
overwrite: true
hooks:
afterAllFileWrite:
- prettier --write
schema: ./schema.graphql
generates:
terraform/amplience_content_types.tf:
preset: amplience-graphql-codegen-json
plugins:
- amplience-graphql-codegen-json
config:
hostname: https://schema-examples.com
The hostname
is optional and will default to https://schema-examples.com
.
type MyContentType @amplienceContentType {
"""
This a description for the "name" property.
"""
name: String
age: Int!
}
This will generate 1 json schema file named terraform/schemas/my-content-type.json
describing the content type with 2 properties of which age
is required.
Besides primitive types, lists and enums, you can also use your custom types.
These custom types will be generated as inline types by default.
To create content links, use the @link
directive as shown below.
Alternatively, to create content references, use the @reference
directive as shown below.
Please keep in mind that linked or referenced types also need an @amplienceContentType
directive, otherwise the linked field will link to a nonexisting content type.
Union types are always linked so no @link
directive is necessary.
This plugin adds 2 basic Amplience Scalars that you can use:
type MyContentType @amplienceContentType {
image: AmplienceImage!
video: AmplienceVideo!
}
To further enhance the properties in the JSON schemas, you can add directives to the fields.
Only works on String
types.
type MyContentType @amplienceContentType {
description: String!
@amplienceText(
minLength: 2
maxLength: 4
format: markdown
examples: ["fireman", "musician"]
)
}
Only works on Int
and Float
types.
type MyContentType @amplienceContentType {
rating: Int! @amplienceNumber(minimum: 0, maximum: 10)
}
Only works on list types.
type MyContentType @amplienceContentType {
name: [String!] @amplienceList(minItems: 1, maxItems: 10)
}
Works on String
, Int
, Float
, Boolean
, AmplienceImage
, and AmplienceVideo
.
type MyContentType @amplienceContentType {
name: String! @amplienceLocalized
}
Only works on custom types.
type MyContentType @amplienceContentType {
other: OtherContentType @amplienceLink
}
type OtherContentType @amplienceContentType {
name: String!
}
Only works on custom types.
type MyContentType @amplienceContentType {
other: OtherContentType @amplienceReference
}
type OtherContentType @amplienceContentType {
name: String!
}
Only works on String!
and [String!]!
types.
Note that for a string list, you should use the
items
argument, whereas for a regular string, you should use theitem
argument.
type MyContentType @amplienceContentType {
constString: String @amplienceConst(item: "const")
constArray: [String!]! @amplienceConst(items: ["this", "is", "const"])
}
FAQs
This is a plugin for GraphQL codegen that generates Amplience JSON schemas from your Graphql schema.
The npm package amplience-graphql-codegen-json receives a total of 0 weekly downloads. As such, amplience-graphql-codegen-json popularity was classified as not popular.
We found that amplience-graphql-codegen-json demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.