Skip to content

Commit e352176

Browse files
authored
Merge pull request #66 from postmanlabs/release/v0.3.0
Release version v0.3.0
2 parents 18fd9a5 + 66c4934 commit e352176

File tree

4 files changed

+198
-614
lines changed

4 files changed

+198
-614
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## [Unreleased]
44

5+
## [v0.3.0] - 2024-07-10
6+
7+
### Chore
8+
9+
- Updated postman-collection to v4.4.0.
10+
511
## [v0.2.0] - 2024-07-03
612

713
### Updated
@@ -74,7 +80,9 @@
7480

7581
- Base release
7682

77-
[Unreleased]: https://github.com/postmanlabs/graphql-to-postman/compare/v0.2.0...HEAD
83+
[Unreleased]: https://github.com/postmanlabs/graphql-to-postman/compare/v0.3.0...HEAD
84+
85+
[v0.3.0]: https://github.com/postmanlabs/graphql-to-postman/compare/v0.2.0...v0.3.0
7886

7987
[v0.2.0]: https://github.com/postmanlabs/graphql-to-postman/compare/v0.1.1...v0.2.0
8088

lib/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
var schemaToQuery = require('./assets/gql-generator').schemaToQuery,
22
converter,
33
util = require('./util'),
4-
sdk = require('postman-collection'),
4+
{ Collection } = require('postman-collection/lib/collection/collection'),
5+
{ ItemGroup } = require('postman-collection/lib/collection/item-group'),
6+
{ Variable } = require('postman-collection/lib/collection/variable'),
57
_ = require('lodash'),
68
graphql = require('graphql');
79

@@ -227,7 +229,7 @@ converter = {
227229
convert: function (input, options, callback) {
228230
var gqlSchemaObj,
229231
data,
230-
collection = new sdk.Collection(),
232+
collection = new Collection(),
231233
analysis,
232234
queryCollection;
233235

@@ -284,7 +286,7 @@ converter = {
284286
}
285287

286288
_.forEach(queryCollection, (value, key) => {
287-
var folder = new sdk.ItemGroup();
289+
var folder = new ItemGroup();
288290
folder.name = key;
289291
_.forEach(value, (graphqlObj, name) => {
290292
var request = {},
@@ -303,7 +305,7 @@ converter = {
303305
collection.items.add(folder);
304306
});
305307

306-
collection.variables.add(new sdk.Variable({
308+
collection.variables.add(new Variable({
307309
id: 'url',
308310
value: '',
309311
description: 'URL for the request.'

0 commit comments

Comments
 (0)