Releases: StafflinePeoplePlus/sveltekit-graphql
v0.4.3
v0.4.2
v0.4.1
v0.4.0
Minor Changes
-
548f57b: Add option to pass context to the Yoga GraphQL server
This just passes the context straight to the createYoga function. It can either be an object or a
function that takes the request context and returns an object.const server = createServer(schema, { context: { hello: 'world' }, });
-
dd3eac9: Write combined server schema into .sveltekit-graphql/schema.graphql and point houdini to this file.
The include path for houdini has also been updated to prevent inclusion of any .graphql files by
default. -
dd3eac9: Allow configuring additional server schema files.
By default the schema glob for the graphql server is defined as
src/graphql/**/*.graphql
. This can
now be expanded by adding theadditionalServerSchema
property to yourhoudini.config.js
file.E.g.
import { createHoudiniConfig } from 'sveltekit-graphql/config'; const config = createHoudiniConfig({ additionalServerSchema: ['./node_modules/my-cool-graphql-module/schema.graphql'], }); export default config;
-
dd3eac9: Add out of the box support for the
@oneOf
directive
v0.3.0
Minor Changes
-
4108ab3: Support for custom scalars in server code generation.
Custom scalars defined in your houdini.config.js will now be picked up by the server code
generation. By default they will be given the typestring
, but this can be changed by setting the
serverType
on the scalar config. Note that thetype
field only affects the client side type, as
the server does not use the custom marshal/unmarshal functions defined here and so the types will
likely differ.For example, here is an example with a custom
Void
typeimport { createHoudiniConfig } from 'sveltekit-graphql/config'; const config = createHoudiniConfig({ scalars: { Void: { type: 'void', serverType: 'void', marshal: () => null, unmarshal: () => {}, }, }, }); export default config;