Redwood v0.37 updates

This commit is contained in:
A. David Thyresson
2021-10-01 16:26:41 -04:00
parent 78db0cc58b
commit f9fd46e710
17 changed files with 2206 additions and 1901 deletions

View File

@@ -1,5 +1,5 @@
import { UserInputError } from '@redwoodjs/graphql-server'
import { db } from 'src/lib/db'
import { UserInputError } from '@redwoodjs/api'
const validate = (input) => {
if (input.email && !input.email.match(/[^@]+@[^.]+\..+/)) {

View File

@@ -1,9 +1,11 @@
export const standard = defineScenario({
contact: {
john: {
name: 'John Doe',
email: 'john.doe@example.com',
message: 'I love RedwoodJS',
data: {
name: 'John Doe',
email: 'john.doe@example.com',
message: 'I love RedwoodJS',
}
},
},
})

View File

@@ -1,10 +1,4 @@
import { db } from 'src/lib/db'
import { requireAuth } from 'src/lib/auth'
// Used when the environment variable REDWOOD_SECURE_SERVICES=1
export const beforeResolver = (rules) => {
rules.add(requireAuth)
}
export const posts = () => {
return db.post.findMany()

View File

@@ -1,6 +1,10 @@
export const standard = defineScenario({
post: {
one: { title: 'String', body: 'String' },
two: { title: 'String', body: 'String' },
one: {
data: { title: 'String', body: 'String' }
},
two: {
data: { title: 'String', body: 'String' }
},
},
})