Tabnine Logo
com.apollographql.apollo.api
Code IndexAdd Tabnine to your IDE (free)

How to use com.apollographql.apollo.api

Best Java code snippets using com.apollographql.apollo.api (Showing top 20 results out of 315)

origin: apollographql/apollo-android

public Builder<T> toBuilder() {
 return new Builder<T>(operation)
   .data(data)
   .errors(errors)
   .dependentKeys(dependentKeys)
   .fromCache(fromCache);
}
origin: apollographql/apollo-android

public RealResponseReader(Operation.Variables operationVariables, R recordSet,
  FieldValueResolver<R> fieldValueResolver, ScalarTypeAdapters scalarTypeAdapters,
  ResolveDelegate<R> resolveDelegate) {
 this.operationVariables = operationVariables;
 this.recordSet = recordSet;
 this.fieldValueResolver = fieldValueResolver;
 this.scalarTypeAdapters = scalarTypeAdapters;
 this.resolveDelegate = resolveDelegate;
 this.variableValues = operationVariables.valueMap();
}
origin: apollographql/apollo-android

/**
 * Creates a new {@link Input} instance that is always undefined.
 *
 * @param value to be wrapped
 * @return a new {@link Input} instance
 */
public static <V> Input<V> absent() {
 return new Input<>(null, false);
}
origin: apollographql/apollo-android

 InterceptorResponse cacheMissResponse(Operation operation) {
  return new InterceptorResponse(null, Response.builder(operation).fromCache(true).build(), null);
 }
}
origin: apollographql/apollo-android

static String idForSubscription(Subscription<?, ?, ?> subscription) {
 return subscription.operationId() + "$" + subscription.variables().valueMap().hashCode();
}
origin: apollographql/apollo-android

/**
 * Factory method for creating a Field instance representing a custom {@link Type#OBJECT}.
 *
 * @param responseName alias for the result of a field
 * @param fieldName    name of the field in the GraphQL operation
 * @param arguments    arguments to be passed along with the field
 * @param optional     whether the arguments passed along are optional or required
 * @param conditions   list of conditions for this field
 * @return Field instance representing custom {@link Type#OBJECT}
 */
public static ResponseField forObject(String responseName, String fieldName, Map<String, Object> arguments,
  boolean optional, List<Condition> conditions) {
 return new ResponseField(Type.OBJECT, responseName, fieldName, arguments, optional, conditions);
}
origin: apollographql/apollo-android

 public Response<T> build() {
  return new Response<>(this);
 }
}
origin: apollographql/apollo-android

/**
 * Factory method for creating a Field instance representing a custom GraphQL Scalar type, {@link Type#CUSTOM}
 *
 * @param responseName alias for the result of a field
 * @param fieldName    name of the field in the GraphQL operation
 * @param arguments    arguments to be passed along with the field
 * @param optional     whether the arguments passed along are optional or required
 * @param scalarType   the custom scalar type of the field
 * @param conditions   list of conditions for this field
 * @return Field instance representing {@link Type#CUSTOM}
 */
public static CustomTypeField forCustomType(String responseName, String fieldName, Map<String, Object> arguments,
  boolean optional, ScalarType scalarType, List<Condition> conditions) {
 return new CustomTypeField(responseName, fieldName, arguments, optional, scalarType, conditions);
}
origin: apollographql/apollo-android

@Test
public void testInputNotEqualsOnDifferentObjects() {
  TestObject object = new TestObject("Hello world!");
  TestObject anotherObject = new TestObject("Bye world!");
  Input<TestObject> aInput = Input.fromNullable(object);
  Input<TestObject> anotherInput = Input.fromNullable(anotherObject);
  assertNotEquals(aInput, anotherInput);
}
origin: apollographql/apollo-android

 @Override public void marshal(InputFieldWriter writer) throws IOException {
  writer.writeString("someField", "someValue");
 }
});
origin: apollographql/apollo-android

/**
 * Factory method for creating a Field instance representing {@link Type#DOUBLE}.
 *
 * @param responseName alias for the result of a field
 * @param fieldName    name of the field in the GraphQL operation
 * @param arguments    arguments to be passed along with the field
 * @param optional     whether the arguments passed along are optional or required
 * @param conditions   list of conditions for this field
 * @return Field instance representing {@link Type#DOUBLE}
 */
public static ResponseField forDouble(String responseName, String fieldName, Map<String, Object> arguments,
  boolean optional, List<Condition> conditions) {
 return new ResponseField(Type.DOUBLE, responseName, fieldName, arguments, optional, conditions);
}
origin: apollographql/apollo-android

@Test
public void testInputEqualsOnEqualObjectsWithDifferentReferences() {
  TestObject object1 = new TestObject("Hello world!");
  TestObject object2 = new TestObject("Hello world!");
  Input<TestObject> input1 = Input.fromNullable(object1);
  Input<TestObject> input2 = Input.fromNullable(object2);
  assertEquals(input1, input2);
}
origin: apollographql/apollo-android

/**
 * Factory method for creating a Field instance representing {@link Type#ENUM}.
 *
 * @param responseName alias for the result of a field
 * @param fieldName    name of the field in the GraphQL operation
 * @param arguments    arguments to be passed along with the field
 * @param optional     whether the arguments passed along are optional or required
 * @param conditions   list of conditions for this field
 * @return Field instance representing {@link Type#ENUM}
 */
public static ResponseField forEnum(String responseName, String fieldName, Map<String, Object> arguments,
  boolean optional, List<Condition> conditions) {
 return new ResponseField(Type.ENUM, responseName, fieldName, arguments, optional, conditions);
}
origin: apollographql/apollo-android

@Test
public void testInputNotEqualsWhenAnObjectIsNull() {
  TestObject object = new TestObject(null);
  Input<TestObject> aInput = Input.fromNullable(object);
  Input<TestObject> anotherInput = Input.fromNullable(null);
  assertNotEquals(aInput, anotherInput);
}
origin: apollographql/apollo-android

/**
 * Factory method for creating a Field instance representing {@link Type#LIST}.
 *
 * @param responseName alias for the result of a field
 * @param fieldName    name of the field in the GraphQL operation
 * @param arguments    arguments to be passed along with the field
 * @param optional     whether the arguments passed along are optional or required
 * @param conditions   list of conditions for this field
 * @return Field instance representing {@link Type#LIST}
 */
public static ResponseField forList(String responseName, String fieldName, Map<String, Object> arguments,
  boolean optional, List<Condition> conditions) {
 return new ResponseField(Type.LIST, responseName, fieldName, arguments, optional, conditions);
}
origin: apollographql/apollo-android

@Test
public void testInputEqualsOnObjectsWithNullValue() {
  TestObject object = new TestObject(null);
  Input<TestObject> aInput = Input.fromNullable(object);
  Input<TestObject> anotherInput = Input.fromNullable(object);
  assertEquals(aInput, anotherInput);
}
origin: apollographql/apollo-android

/**
 * Factory method for creating a Field instance representing {@link Type#STRING}.
 *
 * @param responseName alias for the result of a field
 * @param fieldName    name of the field in the GraphQL operation
 * @param arguments    arguments to be passed along with the field
 * @param optional     whether the arguments passed along are optional or required
 * @param conditions   list of conditions for this field
 * @return Field instance representing {@link Type#STRING}
 */
public static ResponseField forString(String responseName, String fieldName, Map<String, Object> arguments,
  boolean optional, List<Condition> conditions) {
 return new ResponseField(Type.STRING, responseName, fieldName, arguments, optional, conditions);
}
origin: apollographql/apollo-android

/**
 * Factory method for creating a Field instance representing {@link Type#INT}.
 *
 * @param responseName alias for the result of a field
 * @param fieldName    name of the field in the GraphQL operation
 * @param arguments    arguments to be passed along with the field
 * @param optional     whether the arguments passed along are optional or required
 * @param conditions   list of conditions for this field
 * @return Field instance representing {@link Type#INT}
 */
public static ResponseField forInt(String responseName, String fieldName, Map<String, Object> arguments,
  boolean optional, List<Condition> conditions) {
 return new ResponseField(Type.INT, responseName, fieldName, arguments, optional, conditions);
}
origin: apollographql/apollo-android

/**
 * Factory method for creating a Field instance representing {@link Type#LONG}.
 *
 * @param responseName alias for the result of a field
 * @param fieldName    name of the field in the GraphQL operation
 * @param arguments    arguments to be passed along with the field
 * @param optional     whether the arguments passed along are optional or required
 * @param conditions   list of conditions for this field
 * @return Field instance representing {@link Type#LONG}
 */
public static ResponseField forLong(String responseName, String fieldName, Map<String, Object> arguments,
  boolean optional, List<Condition> conditions) {
 return new ResponseField(Type.LONG, responseName, fieldName, arguments, optional, conditions);
}
origin: apollographql/apollo-android

/**
 * Factory method for creating a Field instance representing {@link Type#BOOLEAN}.
 *
 * @param responseName alias for the result of a field
 * @param fieldName    name of the field in the GraphQL operation
 * @param arguments    arguments to be passed along with the field
 * @param optional     whether the arguments passed along are optional or required
 * @param conditions   list of conditions for this field
 * @return Field instance representing {@link Type#BOOLEAN}
 */
public static ResponseField forBoolean(String responseName, String fieldName, Map<String, Object> arguments,
  boolean optional, List<Condition> conditions) {
 return new ResponseField(Type.BOOLEAN, responseName, fieldName, arguments, optional, conditions);
}
com.apollographql.apollo.api

Most used classes

  • Utils
    Contains utility methods for checking Preconditions
  • Optional
    An immutable object that may contain a non-null reference to another object. Each instance of this t
  • Response
    Represents either a successful or failed response received from the GraphQL server.
  • Operation$Variables
    Abstraction for the variables which are a part of the GraphQL operation. For example, for the follow
  • ResponseField
    Field is an abstraction for a field in a graphQL operation. Field can refer to: GraphQL Scalar Type
  • ResponseField$CustomTypeField,
  • Error,
  • ResponseField$BooleanCondition,
  • ResponseField$TypeNameCondition,
  • Operation,
  • Input,
  • InputFieldMarshaller,
  • HttpCachePolicy$FetchStrategy,
  • Error$Location,
  • GraphqlFragment,
  • InputFieldWriter$ListWriter,
  • Operation$Data,
  • OperationName,
  • ResponseField$Condition
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now