diff --git a/packages/insomnia-app/app/models/response.js b/packages/insomnia-app/app/models/response.js index c15443f5c..9407722f6 100644 --- a/packages/insomnia-app/app/models/response.js +++ b/packages/insomnia-app/app/models/response.js @@ -130,8 +130,6 @@ export async function create(patch: Object = {}, maxResponses: number = 20) { const { parentId } = patch; - const settings = await models.settings.getOrCreate(); - // Create request version snapshot const request = await models.request.getById(parentId); const requestVersion = request ? await models.requestVersion.create(request) : null; @@ -141,7 +139,7 @@ export async function create(patch: Object = {}, maxResponses: number = 20) { const allResponses = await db.findMostRecentlyModified( type, { parentId }, - settings.maxHistoryResponses, + Math.max(1, maxResponses), ); const recentIds = allResponses.map(r => r._id); await db.removeWhere(type, { parentId, _id: { $nin: recentIds } }); diff --git a/packages/insomnia-app/app/ui/components/editors/body/graph-ql-editor.js b/packages/insomnia-app/app/ui/components/editors/body/graph-ql-editor.js index 1e799aafc..fe3d87410 100644 --- a/packages/insomnia-app/app/ui/components/editors/body/graph-ql-editor.js +++ b/packages/insomnia-app/app/ui/components/editors/body/graph-ql-editor.js @@ -68,7 +68,6 @@ class GraphQLEditor extends React.PureComponent { _isMounted: boolean; _queryEditor: null | CodeMirror; _schemaFetchTimeout: TimeoutID; - _highlightTimeout: TimeoutID; constructor(props: Props) { super(props); @@ -559,23 +558,22 @@ class GraphQLEditor extends React.PureComponent { />
- {!hideSchemaFetchErrors && - schemaFetchError && ( -
-
- - - {' '} - -
- {schemaFetchError.message} -
+ {' '} +
- )} + {schemaFetchError.message} +
+
+ )}
{this.renderSchemaFetchMessage()} @@ -584,7 +582,8 @@ class GraphQLEditor extends React.PureComponent {

Query Variables - Variables to use in GraphQL query
(JSON format) + Variables to use in GraphQL query
+ (JSON format)
{variablesSyntaxError && ( {variablesSyntaxError} diff --git a/packages/insomnia-app/app/ui/components/settings/general.js b/packages/insomnia-app/app/ui/components/settings/general.js index 4ae4af4da..13764aa18 100644 --- a/packages/insomnia-app/app/ui/components/settings/general.js +++ b/packages/insomnia-app/app/ui/components/settings/general.js @@ -222,19 +222,6 @@ class General extends React.PureComponent {

-
- -
-