mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-10 03:13:53 +02:00
Create GraphQL project (#1334)
* Create new project for GraphQL * ... * . * ok? * Update src/WireMock.Net.Shared/Extensions/AnyOfExtensions.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * -- * ... --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -4,6 +4,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using AnyOfTypes;
|
||||
using Newtonsoft.Json;
|
||||
using WireMock.Models.GraphQL;
|
||||
|
||||
namespace WireMock.Models;
|
||||
|
||||
@@ -22,17 +23,16 @@ public class GraphQLSchemaDetails
|
||||
/// </summary>
|
||||
public StringPattern? SchemaAsStringPattern { get; set; }
|
||||
|
||||
#if GRAPHQL
|
||||
/// <summary>
|
||||
/// The GraphQL schema as a <seealso cref="GraphQL.Types.ISchema"/>.
|
||||
/// The GraphQL schema as a <seealso cref="ISchemaData"/>.
|
||||
/// </summary>
|
||||
public GraphQL.Types.ISchema? SchemaAsISchema { get; set; }
|
||||
public ISchemaData? SchemaAsISchemaData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The GraphQL Schema.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public AnyOf<string, StringPattern, GraphQL.Types.ISchema>? Schema
|
||||
public AnyOf<string, StringPattern, ISchemaData>? Schema
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -46,15 +46,14 @@ public class GraphQLSchemaDetails
|
||||
return SchemaAsStringPattern;
|
||||
}
|
||||
|
||||
if (SchemaAsISchema != null)
|
||||
if (SchemaAsISchemaData != null)
|
||||
{
|
||||
return new AnyOf<string, StringPattern, GraphQL.Types.ISchema>(SchemaAsISchema);
|
||||
return new AnyOf<string, StringPattern, ISchemaData>(SchemaAsISchemaData);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The custom Scalars to define for this schema.
|
||||
|
||||
Reference in New Issue
Block a user