![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Declarative, code-first and strongly typed GraphQL schema construction for TypeScript & JavaScript
GraphQL Nexus can be used independently from Prisma. To learn how it can best be combined with Prisma, check out the
nexus-prisma
plugin.
graphql-js
"Hello World" GraphQL server with graphql-yoga
import { queryType, stringArg, makeSchema } from "nexus";
import { GraphQLServer } from "graphql-yoga";
const Query = queryType({
definition(t) {
t.string("hello", {
args: { name: stringArg({ nullable: true }) },
resolve: (parent, { name }) => `Hello ${name || "World"}!`,
});
},
});
const schema = makeSchema({
types: [Query],
outputs: {
schema: __dirname + "/generated/schema.graphql",
typegen: __dirname + "/generated/typings.ts",
},
});
const server = new GraphQLServer({
schema,
});
server.start(() => `Server is running on http://localhost:4000`);
All examples of GraphQL Nexus can be found in the /examples
directory:
If you're interested in examples using the nexus-prisma
plugin, check out the official prisma-examples
repo:
graphql-js
types, and it's just a GraphQLSchema
so it fits in just fine with existing community solutions of apollo-server
, graphql-middleware
, etc.nexus-prisma
pluginYou can find the docs for GraphQL Nexus here.
GraphQL Nexus can be installed via the nexus
package. It also requires graphql
as a peer dependency:
npm install --save nexus graphql
or
yarn add nexus graphql
If you've been following an SDL-first approach to build your GraphQL server and want to see what your code looks like when written with GraphQL Nexus, you can use the SDL converter:
(c) 2018-2019 Tim Griesser
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0.12.0-rc
feat(deps): Bumps the default minimum version of graphql-js to 14.5.0
Nexus uses the new extensions
property on types to store metadata provided to Nexus types, in order to make them usable by plugins.
feat: Adds "Plugins" API, see the docs for more info on what all these can help accomplish
feat(plugin): Add nullabilityGuardPlugin
. See the docs for more info
feat(plugin): Add fieldAuthorizePlugin
. See the docs for more info
This is the same behavior as before, but implemented more flexibly as a plugin. This will be
automatically added if no plugins are specified, otherwise it will need to be imported & added
to makeSchema
.
feat(schema): Adds shouldExitAfterGenerateArtifacts
option to makeSchema
The shouldExitAfterGenerateArtifacts
makes it possible to exit after the types are generated,
useful if you do not check a schema artifact into source control, but wish to generate before the code runs.
refactor: Removes nexusWrappedType
This was an internal implementation detail which should not affect end users
refactor: Removes t.modifyType
API
This may not have ever worked, it was only intended to modify fields on an objectType
which were
originally implemented by an interface. Please open an issue if this is a breaking change for you, so we
can understand the use-case and design a better API.
test: Improved code coverage, adds base threshold to new PRs
FAQs
Scalable, strongly typed GraphQL schema development
The npm package nexus receives a total of 0 weekly downloads. As such, nexus popularity was classified as not popular.
We found that nexus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.