Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release version v0.3.0 #66

Merged
merged 5 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## [Unreleased]

## [v0.3.0] - 2024-07-10

### Chore

- Updated postman-collection to v4.4.0.

## [v0.2.0] - 2024-07-03

### Updated
Expand Down Expand Up @@ -74,7 +80,9 @@

- Base release

[Unreleased]: https://github.com/postmanlabs/graphql-to-postman/compare/v0.2.0...HEAD
[Unreleased]: https://github.com/postmanlabs/graphql-to-postman/compare/v0.3.0...HEAD

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

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

Expand Down
10 changes: 6 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
var schemaToQuery = require('./assets/gql-generator').schemaToQuery,
converter,
util = require('./util'),
sdk = require('postman-collection'),
{ Collection } = require('postman-collection/lib/collection/collection'),
{ ItemGroup } = require('postman-collection/lib/collection/item-group'),
{ Variable } = require('postman-collection/lib/collection/variable'),
_ = require('lodash'),
graphql = require('graphql');

Expand Down Expand Up @@ -227,7 +229,7 @@ converter = {
convert: function (input, options, callback) {
var gqlSchemaObj,
data,
collection = new sdk.Collection(),
collection = new Collection(),
analysis,
queryCollection;

Expand Down Expand Up @@ -284,7 +286,7 @@ converter = {
}

_.forEach(queryCollection, (value, key) => {
var folder = new sdk.ItemGroup();
var folder = new ItemGroup();
folder.name = key;
_.forEach(value, (graphqlObj, name) => {
var request = {},
Expand All @@ -303,7 +305,7 @@ converter = {
collection.items.add(folder);
});

collection.variables.add(new sdk.Variable({
collection.variables.add(new Variable({
id: 'url',
value: '',
description: 'URL for the request.'
Expand Down
Loading
Loading