@graphql-tools/utils 10.9.0 → 10.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -162,15 +162,9 @@ function getDirectiveNodes(entity, schema, pathToDirectivesInExtensions) {
162
162
  let oneOfDirectiveNode = null;
163
163
  if (directives != null) {
164
164
  directiveNodesBesidesNativeDirectives = directives.filter(directive => graphql_1.specifiedDirectives.every(specifiedDirective => specifiedDirective.name !== directive.name.value));
165
- if (entity.deprecationReason != null) {
166
- deprecatedDirectiveNode = directives.find(directive => directive.name.value === 'deprecated');
167
- }
168
- if (entity.specifiedByUrl != null || entity.specifiedByURL != null) {
169
- specifiedByDirectiveNode = directives.find(directive => directive.name.value === 'specifiedBy');
170
- }
171
- if (entity.isOneOf) {
172
- oneOfDirectiveNode = directives.find(directive => directive.name.value === 'oneOf');
173
- }
165
+ deprecatedDirectiveNode = directives.find(directive => directive.name.value === 'deprecated');
166
+ specifiedByDirectiveNode = directives.find(directive => directive.name.value === 'specifiedBy');
167
+ oneOfDirectiveNode = directives.find(directive => directive.name.value === 'oneOf');
174
168
  }
175
169
  if (entity.deprecationReason != null && deprecatedDirectiveNode == null) {
176
170
  deprecatedDirectiveNode = makeDeprecatedDirective(entity.deprecationReason);
@@ -142,15 +142,9 @@ export function getDirectiveNodes(entity, schema, pathToDirectivesInExtensions)
142
142
  let oneOfDirectiveNode = null;
143
143
  if (directives != null) {
144
144
  directiveNodesBesidesNativeDirectives = directives.filter(directive => specifiedDirectives.every(specifiedDirective => specifiedDirective.name !== directive.name.value));
145
- if (entity.deprecationReason != null) {
146
- deprecatedDirectiveNode = directives.find(directive => directive.name.value === 'deprecated');
147
- }
148
- if (entity.specifiedByUrl != null || entity.specifiedByURL != null) {
149
- specifiedByDirectiveNode = directives.find(directive => directive.name.value === 'specifiedBy');
150
- }
151
- if (entity.isOneOf) {
152
- oneOfDirectiveNode = directives.find(directive => directive.name.value === 'oneOf');
153
- }
145
+ deprecatedDirectiveNode = directives.find(directive => directive.name.value === 'deprecated');
146
+ specifiedByDirectiveNode = directives.find(directive => directive.name.value === 'specifiedBy');
147
+ oneOfDirectiveNode = directives.find(directive => directive.name.value === 'oneOf');
154
148
  }
155
149
  if (entity.deprecationReason != null && deprecatedDirectiveNode == null) {
156
150
  deprecatedDirectiveNode = makeDeprecatedDirective(entity.deprecationReason);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/utils",
3
- "version": "10.9.0",
3
+ "version": "10.9.1",
4
4
  "description": "Common package containing utils and types for GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {