Skip to content

Commit

Permalink
Fixed reproduction and website problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
radekmie committed Jan 19, 2021
1 parent 5212ec2 commit 8645ac1
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/api-bridges.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Currently available bridges:

```js
import { GraphQLBridge } from 'uniforms-bridge-graphql';
import { buildASTSchema } from 'graphql';
import { parse } from 'graphql';
import { buildASTSchema } from 'graphql/utilities';
import { parse } from 'graphql/language/parser';

const schema = `
type Author {
Expand Down
3 changes: 2 additions & 1 deletion reproductions/schema/graphql-schema.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { parse } from 'graphql/language/parser';
import { buildASTSchema } from 'graphql/utilities';
import { GraphQLBridge } from 'uniforms-bridge-graphql';
import { GraphQLObjectType, buildASTSchema, parse } from 'graphql';

const schema = `
type Address {
Expand Down
1 change: 1 addition & 0 deletions reproductions/schema/json-schema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Ajv from 'ajv';
import { JSONSchemaBridge } from 'uniforms-bridge-json-schema';

const ajv = new Ajv({ allErrors: true, useDefaults: true });
ajv.addKeyword('uniforms');

function createValidator(schema: object) {
const validator = ajv.compile(schema);
Expand Down
1 change: 1 addition & 0 deletions website/pages-parts/CommonForms/SignUpSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Ajv from 'ajv';
import { JSONSchemaBridge } from 'uniforms-bridge-json-schema';

const ajv = new Ajv({ allErrors: true, useDefaults: true, $data: true });
ajv.addKeyword('uniforms');

const schema = {
title: 'Guest',
Expand Down
6 changes: 5 additions & 1 deletion website/pages-parts/CustomFields/RangeFieldSchema.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import Ajv from 'ajv';
import { JSONSchemaBridge } from 'uniforms-bridge-json-schema';

const ajv = new Ajv({ allErrors: true, useDefaults: true });
const ajv = new Ajv({
allErrors: true,
formats: { 'date-time': true },
useDefaults: true,
});

const schema = {
title: 'Date Range',
Expand Down
1 change: 1 addition & 0 deletions website/pages-parts/Tutorial/GuestSchema3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { JSONSchemaBridge } from 'uniforms-bridge-json-schema';
import { LongTextField } from 'uniforms-unstyled';

const ajv = new Ajv({ allErrors: true, useDefaults: true });
ajv.addVocabulary(['options', 'uniforms']);

// <schema>
const schema = {
Expand Down
1 change: 1 addition & 0 deletions website/pages-parts/Tutorial/GuestSchema4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { LongTextField } from 'uniforms-unstyled';
import ImageField from './ImageField';

const ajv = new Ajv({ allErrors: true, useDefaults: true });
ajv.addVocabulary(['options', 'uniforms']);

// <schema>
const schema = {
Expand Down
File renamed without changes.
4 changes: 0 additions & 4 deletions website/theme/index.css → website/src/theme/index.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
code {
color: unset;
}

pre {
border-radius: var(--ifm-global-radius) !important;
overflow: auto !important;
Expand Down

0 comments on commit 8645ac1

Please sign in to comment.