silverwolf-x's picture
download
raw
629 Bytes
import { createYoga, createSchema } from "graphql-yoga";
const typeDefs = /* GraphQL */ `
type Query {
users: [User!]!
}
type User {
name: String
}
`;
const resolvers = {
Query: {
users() {
return [{ name: "Nextjs" }];
},
},
};
const schema = createSchema({
typeDefs,
resolvers,
});
export const config = {
api: {
// Disable body parsing (required for file uploads)
bodyParser: false,
},
};
export default createYoga({
schema,
// Needed to be defined explicitly because our endpoint lives at a different path other than `/graphql`
graphqlEndpoint: "/api/graphql",
});

Xet Storage Details

Size:
629 Bytes
·
Xet hash:
a9c342368e23e7cbafe1e66c983ff0b8cbc142342674790761e329d771e28fda

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.