-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into file-adapater-remove-s3-required-params
- Loading branch information
Showing
118 changed files
with
2,282 additions
and
1,462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
--- | ||
|
||
Fixed a few minor usability issues with item sorting: | ||
- Fixed list view sort indicator pointing the wrong way. Previously, it would unintuitively point down for ascending down and vice-versa for descending. | ||
- Fixed Sort Select popup losing focus when pressing Alt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/list-plugins': patch | ||
--- | ||
|
||
Improved at-tracking date display format. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
'@keystonejs/fields': patch | ||
--- | ||
|
||
Added a password field cell view. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
'@keystonejs/fields': patch | ||
--- | ||
|
||
Simplifed ItemLink handling. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/auth-password': patch | ||
--- | ||
|
||
Correct the config docs; the options are `identityField` & `secretField`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': major | ||
'@keystonejs/field-content': major | ||
'@keystonejs/fields': major | ||
'@keystonejs/fields-mongoid': major | ||
--- | ||
|
||
Refactored how list and item queries and generated. Field controllers' `getFilterGraphQL` method now returns an object in the format { filter: value } rather than a GraphQL string. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/fields': patch | ||
--- | ||
|
||
Fixed React warning about controlled handling in the Float field. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/fields': minor | ||
--- | ||
|
||
Added support for arguments being defined on `Virtual` fields. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
'@keystonejs/demo-project-blog': patch | ||
'@keystonejs/demo-project-meetup': patch | ||
'@keystonejs/apollo-helpers': patch | ||
'@keystonejs/app-admin-ui': patch | ||
'@keystonejs/app-graphql': patch | ||
'@keystonejs/app-graphql-playground': patch | ||
'@keystonejs/fields': patch | ||
'@keystonejs/keystone': patch | ||
--- | ||
|
||
Updated various Apollo dependencies to their latest versions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
--- | ||
|
||
Fixed an issue with the no-lists-defined display. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
--- | ||
|
||
Disable Update button in popout if no fields are selected. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
'@keystonejs/fields': patch | ||
'@keystonejs/keystone': patch | ||
--- | ||
|
||
Removed some workarounds for issues with older graphql versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
'@keystonejs/access-control': major | ||
'@keystonejs/keystone': major | ||
'@keystonejs/logger': patch | ||
--- | ||
|
||
Added async capability for all Access Control resolvers. This changes the below methods to async functions, returning Promises: | ||
|
||
``` | ||
access-control | ||
- validateCustomAccessControl | ||
- validateListAccessControl | ||
- validateFieldAccessControl | ||
- validateAuthAccessControl | ||
keystone/List | ||
- checkFieldAccess | ||
- checkListAccess | ||
keystone/providers/custom | ||
- computeAccess | ||
keystone/providers/listAuth | ||
- checkAccess | ||
``` | ||
|
||
Changed `keystone/Keystone`'s `getGraphQlContext` return object (context) to include async resolvers for the following methods: | ||
``` | ||
- context.getCustomAccessControlForUser | ||
- context.getListAccessControlForUser | ||
- context.getFieldAccessControlForUser | ||
- context.getAuthAccessControlForUser | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
--- | ||
|
||
Phased out Emotion.styled in favor of Emotion's css prop. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
--- | ||
|
||
Refactored how query refetches are handled. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
--- | ||
|
||
Used fixed table layout. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
--- | ||
|
||
Cleaned up TableRow and BodyCell styling. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
--- | ||
|
||
Fixed duplicate Access Denied errors appearing for lists. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
--- | ||
|
||
Converted more React components to functional form. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
--- | ||
|
||
Include persistent search state when navigating back to list. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/build-field-types': patch | ||
--- | ||
|
||
Removed unused @babel/plugin-transform-flow-strip-types dependency. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/app-admin-ui': patch | ||
--- | ||
|
||
Cleaned up on-create callback duplication. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystonejs/fields': patch | ||
--- | ||
|
||
Added validation to ensure the CloudinaryImage field is used with CloudinaryAdapter. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
const { multiAdapterRunners, setupServer, graphqlRequest } = require('@keystonejs/test-utils'); | ||
const { Integer, Virtual } = require('@keystonejs/fields'); | ||
const cuid = require('cuid'); | ||
|
||
function makeSetupKeystone(fields) { | ||
return function setupKeystone(adapterName) { | ||
return setupServer({ | ||
adapterName, | ||
name: `ks5-testdb-${cuid()}`, | ||
createLists: keystone => { | ||
keystone.createList('Post', { | ||
fields: { | ||
value: { type: Integer }, | ||
...fields, | ||
}, | ||
}); | ||
}, | ||
}); | ||
}; | ||
} | ||
|
||
multiAdapterRunners().map(({ runner, adapterName }) => | ||
describe(`Adapter: ${adapterName}`, () => { | ||
describe('Virtual field type', () => { | ||
test( | ||
'Default - resolver returns a string', | ||
runner( | ||
makeSetupKeystone({ | ||
foo: { type: Virtual, resolver: () => 'Hello world!' }, | ||
}), | ||
async ({ keystone }) => { | ||
const { data, errors } = await graphqlRequest({ | ||
keystone, | ||
query: `mutation { | ||
createPost(data: { value: 1 }) { value, foo } | ||
}`, | ||
}); | ||
expect(errors).toBe(undefined); | ||
expect(data.createPost.value).toEqual(1); | ||
expect(data.createPost.foo).toEqual('Hello world!'); | ||
} | ||
) | ||
); | ||
|
||
test( | ||
'graphQLReturnType', | ||
runner( | ||
makeSetupKeystone({ | ||
foo: { type: Virtual, graphQLReturnType: 'Int', resolver: () => 42 }, | ||
}), | ||
async ({ keystone }) => { | ||
const { data, errors } = await graphqlRequest({ | ||
keystone, | ||
query: `mutation { | ||
createPost(data: { value: 1 }) { value, foo } | ||
}`, | ||
}); | ||
expect(errors).toBe(undefined); | ||
expect(data.createPost.value).toEqual(1); | ||
expect(data.createPost.foo).toEqual(42); | ||
} | ||
) | ||
); | ||
|
||
test( | ||
'args', | ||
runner( | ||
makeSetupKeystone({ | ||
foo: { | ||
type: Virtual, | ||
graphQLReturnType: 'Int', | ||
args: [ | ||
{ name: 'x', type: 'Int' }, | ||
{ name: 'y', type: 'Int' }, | ||
], | ||
resolver: (item, { x = 5, y = 6 }) => x * y, | ||
}, | ||
}), | ||
async ({ keystone }) => { | ||
const { data, errors } = await graphqlRequest({ | ||
keystone, | ||
query: `mutation { | ||
createPost(data: { value: 1 }) { value, foo(x: 10, y: 20) } | ||
}`, | ||
}); | ||
expect(errors).toBe(undefined); | ||
expect(data.createPost.value).toEqual(1); | ||
expect(data.createPost.foo).toEqual(200); | ||
} | ||
) | ||
); | ||
|
||
test( | ||
'args - use defaults', | ||
runner( | ||
makeSetupKeystone({ | ||
foo: { | ||
type: Virtual, | ||
graphQLReturnType: 'Int', | ||
args: [ | ||
{ name: 'x', type: 'Int' }, | ||
{ name: 'y', type: 'Int' }, | ||
], | ||
resolver: (item, { x = 5, y = 6 }) => x * y, | ||
}, | ||
}), | ||
async ({ keystone }) => { | ||
const { data, errors } = await graphqlRequest({ | ||
keystone, | ||
query: `mutation { | ||
createPost(data: { value: 1 }) { value, foo } | ||
}`, | ||
}); | ||
expect(errors).toBe(undefined); | ||
expect(data.createPost.value).toEqual(1); | ||
expect(data.createPost.foo).toEqual(30); | ||
} | ||
) | ||
); | ||
|
||
test( | ||
'graphQLReturnFragment', | ||
runner( | ||
makeSetupKeystone({ | ||
foo: { | ||
type: Virtual, | ||
extendGraphQLTypes: [`type Movie { title: String, rating: Int }`], | ||
graphQLReturnType: '[Movie]', | ||
resolver: () => [{ title: 'CATS!', rating: 100 }], | ||
}, | ||
}), | ||
async ({ keystone }) => { | ||
const { data, errors } = await graphqlRequest({ | ||
keystone, | ||
query: `mutation { | ||
createPost(data: { value: 1 }) { value, foo { title rating } } | ||
}`, | ||
}); | ||
expect(errors).toBe(undefined); | ||
expect(data.createPost.value).toEqual(1); | ||
expect(data.createPost.foo).toEqual([{ title: 'CATS!', rating: 100 }]); | ||
} | ||
) | ||
); | ||
}); | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.