Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
remix-graphql
Advanced tools
Remix and GraphQL can live together in harmony ❤️ This package contains basic utility functions that can help you with that.
To be more speciic, here's what the latest version of remix-graphql
can help
you with:
And here are some cool ideas what it might do as well in the future:
The package exports the following functions and types.
createActionFunction
This higher-order-function returns a loader function that can handle GraphQL requests via POST.
// app/routes/graphql.ts
import { createActionFunction } from "remix-graphql";
import schema from "~/graphql/schema.ts";
export const loader = createActionFunction({ schema });
The function accepts a single argument of the following type:
type Options = {
// The schema to use for execution (required)
schema: GraphQLSchema;
// Compute a custom status code for a successfully executed operation (optional)
deriveStatusCode: DeriveStatusCodeFunction;
};
createLoaderFunction
This higher-order-function returns a loader function that can handle GraphQL requests via GET.
// app/routes/graphql.ts
import { createLoaderFunction } from "remix-graphql";
import schema from "~/graphql/schema.ts";
export const loader = createLoaderFunction({ schema });
The function accepts a single argument of the following type:
type Options = {
// The schema to use for execution (required)
schema: GraphQLSchema;
// Compute a custom status code for a successfully executed operation (optional)
deriveStatusCode: DeriveStatusCodeFunction;
};
DeriveStatusCodeFunction
This TypeScript type can be used for explicit typing of the deriveStatusCode
option that can be passed to createActionFunction
and createLoaderFunction
.
type DeriveStatusCodeFunction = (
// This type comes from the "graphql" package
executionResult: ExecutionResult,
// This is the status code that would be returned by default
defaultStatusCode: number
) => number;
FAQs
Utilities for using GraphQL with a Remix app
The npm package remix-graphql receives a total of 126 weekly downloads. As such, remix-graphql popularity was classified as not popular.
We found that remix-graphql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.